What should I do😭

So I went through my boyfriends phone like 2 days ago, and saw some messages on his snapchat. The messages were 2 years ago but I just found out about this now. It was from when we were 2 months of dating but together for almost a year. He was flirting with the girl in the messages talking about “wtw qt” and even though I only saw one, he slid up on her story putting certain emojis. We’ve been together for almost 3 years now. Of course it hurt me because not only were we dating at the time, but i’ve asked about her a while back and ended up lying to me. Now I don’t know what to do because it was 2 years ago when all of that happened. It’s hurting the both of us.