Forecast capacity vs. demand from multiple perspectives, i.e., by role, department, team, location, skills, etc. It helps you identify short or long-term shortage/excess of resources ahead of time.
Bridge the gap with appropriate resourcing treatments. Take corrective actions, i.e., retrain current employees, hire recruits early on, play around with the project timelines, etc.
Get foresight...