What actually happens in your body after the effort
Before talking about foods, you have to understand what your session did to your body. Without that context, any nutrition tip sounds like a magic recipe from nowhere. Yet eating after a workout answers very concrete physiological needs.
Your energy stores have dropped
During the effort, your body draws on glycogen, the form in which it stores carbohydrates in the muscles and liver. The longer or more intense the session, the more these stores are depleted. Replenishing them lets you approach the next session with energy and avoids the "empty legs" feeling that can linger for days when you completely neglect carbs.
Your muscle fibres have been worked
Training, especially strength work, creates micro-disturbances in the muscle fibres. This is a normal and desirable phenomenon: it's by repairing these fibres that the muscle gets stronger and grows. To repair, the body needs amino acids, the building blocks found in protein. Without enough intake, repair happens less well and progress stalls.
Your body is in "rebuild" mode
After the effort, your body shifts into a phase where it's especially receptive to nutrients: it seeks to replenish, repair and adapt. It's a good moment to give it what it needs, but this receptivity lasts far longer than people think, as we'll see. This rebuilding phase also goes hand in hand with sleep and rest, which I cover in my article on sleep and sports recovery.