If you think you might have a vocation to religious life, then ideally you should be discerning that in your 20s and early 30s, since many orders and seminaries may have a preferred age range, an age cutoff, and possible concerns about whether you’ve incurred a lot of debt, have children etc. The longer you wait, the more likely you are to have some obstacles.
If you are just discerning between single and married, then the reality is that you may need to go with the flow. The right person for you to marry might not present themself in your 20s, or you might need to focus more on finishing school than seeking a marriage partner. Also, the reality is that a lot of spend part of our lives single and part of our lives married. A spouse can die, and marriages that seemed solid can break up despite your best efforts. I was single until I was 31 years old, then I was married for 23 years and then he died so now back to single. I have a relationship with the Lord and a duty to love and serve him regardless of my marital state, so I’m not too concerned about whether my vocation is or was single or married. In addition, I could join a lay order as a single or married person, so that could be part of my vocation too.