The thing is, there's no universal rule here - it really depends on the route, the season, and how far out you're booking. Generally though, booking several weeks in advance tends to be cheaper than waiting until the last minute. Airlines use dynamic pricing algorithms that track demand, and they tend to raise prices as a flight gets closer to departure, especially if seats are filling up. Last-minute deals do exist, but they're usually for flights that aren't selling well, not the popular routes people actually want to fly.
Where the confusion comes in is that occasionally you'll hear about someone scoring an amazing last-minute deal, and that story sticks with you. But those are exceptions, not the rule. Most of the time, waiting costs you more. A month out is actually a solid timeframe - you're hitting that sweet spot where airlines have released their inventory but haven't yet gotten desperate or seen demand spike. If you're flying during peak season or holidays, you might want to go even further ahead.
The real strategy is to set up price alerts on flight comparison sites once you know your dates, then book when you see a price that feels right rather than obsessing over whether it'll drop another $20. I've found that stressing about perfect timing usually costs more in anxiety than it saves in dollars. Lock it in when the price feels fair and you've got your dates confirmed.