Oh my. You’ve had a hard lesson on the consequences of violating someone else’s privacy. It wasn’t your place to snoop. If you were concerned, the more mature thing to do would have been to express your worry to her and to talk about it.
But what is done is done. Since you did snoop, you now are in a difficult bind. If you keep your secret, your relationship with your mom will not be the same. If you share what you think you know, she may be angry with you — both because you did violate her privacy and because she may be caught in an affair she was trying to keep secret. Then again, you may be misinterpreting the whole thing.
I’m afraid the only way out is to come clean. You need to talk to your mom. That means being your most mature self. That means not yelling or accusing or blaming. That means refusing to fight and instead working hard to stay in a conversation.
Apologize for looking at her phone. Then tell her how awful seeing the texts made you feel. Stay with confusion and sadness more than anger if you want the conversation to be productive.
If she is having an affair, do tell her that you can’t keep her secrets for her. If she is cheating on your dad it would be unfair of her to ask you to keep it from him. That would damage your relationship with him. She needs to be the one to talk with your dad about whatever has gone wrong in her marriage, not you.
I wish you well.