You have to buy before you declare combats and play your turn. Set in stone. After your turn, you are likely to see exactly what you needed, so while nothing special stops you from buying at the end of your turn, just before you place, it takes more skill and careful planning to determine your buy before you see the outcome of Combat and Noncombat.
Plenty of times, in a friendly game, people want to switch around their buys, this is fine but its not following the strict rules. You could also buy right before placement. However, this is not what the rules say, so for the max-skill, tournament-legal way of doing it, buys have to be certain and unchangeable before you proceed with the rest of your turn.
Lots of people pre-plan their buys, but once you see what happened on the opponents turn, all this prep can go out the window.