I think this naturally comes with adulthood after dealing with relationships in general after some time, be it family, friends, dates, etc.
This is why I think a lot of young people may fall into toxic relationships frequently.
This tends to happen in high school and sometimes young adulthood, I notice some young people who are desperate or hopeless romantics might end up having 2-6 relationships in only one year, and there's a 90% chance it'll be a short-lived and toxic one that only ends in heartbreak.
Eventually they learn what a healthy relationship is and start having longer and more successful one's until they get it right.
Some others might also try dating and only deal with all the B.S., the flaking, the deviousness of some men who only wanted sex and end up disappointing a woman who specifically stated she's looking for more, the liars and cheaters, etc. and so comes a point where you become a lot more direct and to-the-point.
"I'm interested in you, and want something genuine and serious. Are you interested in me, and capable of living up to my expectations of you?"
You don't need to go through this to have a healthy relationship though.
Plenty end up taking their time, whether they choose to or not, and end up developing themselves and mature while single, so that when they start dating someone who's done the same, they're both properly ready and prepared for a healthy, long-lasting and successful love.
Both methods get to the same destination, they just go about different ways of getting there.
Personally, while I did pursue girls earlier, the best age to even begin any relationship and gain experience would probably be about age 17-19.
Unless you're exceptionally lucky and a very rare case, anything before that will just be two people who have no idea what they're doing, screwing around and seeing what sticks.
I'd rather be the guy who enters a relationship with someone who knows how to make it work just as much as I would than two foolish teens messing around until the next one comes.