My first guitar teacher told me that someday I'd start to notice that you can't get all strings perfectly in tune. At that point, he said, you'll know you're getting somewhere on the guitar.
Get obsessed over the perfect tuning. Blame the imperfections on the quality of the guitar. Don't play until you get a better guitar. Repeat until you give up. Then actually start playing the damn thing.
With an ordinary fretted guitar, you can sort of perfectly tune it to what you play but not perfectly tune it in a global sense.
That’s an issue with tuning instruments in general, and why pianos are generally slightly out of tune as a compromise.
As you get used to a particular guitar and strings, as you train your ear, you can also learn to work around the imperfections by adjusting how you hold down the strings (even with a fretted guitar, you can slightly repitch a string by holding it differently).