Sometimes the weather/humidity can affect the tuning of your guitar.
You may just have tuned it inside the house and set it down for a minute outside…. and when you pick it back up.. Holy Wow!
New strings also like to give you issues with staying in tune. Make sure when you put new strings on to tune it up and then pull on them a few times then re-tune. Also do a little hard strumming then re-tune. This will really help break the new strings in and get them seated. I’d say I do this a good 3 to 5 times.
There also may be some mechanical issues with your guitar’s bridge, tuner posts, and tuner keys. So check into that if your playing seems to whack out a certain individual string all the time.
For info on tuning your guitar, and links to free tuner apps, check out this post: Tune Up with a Tuner