Well, it’s mostly going to be experience to get you there - pattern recognition of “I’ve seen this type of problem before, here’s how we solved it then, and here’s the pros and cons of that solution”
Experience doesn’t always equate to time measured in years or even decades, but it does account for time in front of problems.