You change them when you want
It all depends on you, your needs, your desires, how often you play, your skin chemistry, the type of strings you use, how clean your hands are when you play and probably a bunch of other factors.
With that said… I have in the past changed strings as often as weekly. I currently have my guitar in my office with strings that have been on for months. My plug in guitar that gets played out gets changed about every 3 or 4 performances. One reason for that is they are different strings. My office guitar has monels and they just last forever. As strings get used, their sound changes. That is probably the main reason people think “I need to change my strings.” Another thing that happens in extreme cases is they lose the ability to intonate well (it does not sound in tune when fretted). I think that has to do with work-hardening of the strings (but I don’t know that). As I said at the start… change them when you want