Important! Is there a term for misusing the pronoun “you”? [duplicate]
Solution 1:
I believe it's called "generic you." From Wikipedia:
In English grammar and in particular in casual English, generic you, impersonal you or indefinite you is the pronoun you in its use in referring to an unspecified person, as opposed to its use as the second person pronoun.
The generic you is primarily used as a colloquial or less formal substitute for one.1[2] For instance,
"Brushing one's teeth is healthy."
can be expressed less formally as
"Brushing your teeth is healthy."
Solution 2:
This is called an impersonal pronoun, and it is equivalent to using one. It is just a convention we have in English that we can use the second person pronoun in this context.
Other languages have other conventions for referring to a person as a generic object, and may not use the second person at all.