Air coolers and AIO's share many things in common. One of which is capacity. A 120mm Corsair H60 has almost identical cooling capacity to a CM hyper212 evo. Both @ 140w. Don't confuse ability with capacity, they are totally different. A Noctua NH-D15 is a 250w+ capacity air cooler. So are many 240mm AIO's. They'll handle the output of @ 250w of heat by the cpu. The difference in ability is that the NH-D15 is slightly more efficient, so gets slightly better temps than many AIO's, but that's ability, not capacity. If you get a high OC that's capable of 300w, you'll find that normal usage on a NH-D15 is just fine, but once you get to @ 250w loads, even that cooler is at its limits, and temps take a very sharp incline upwards.
Many ppl base decisions on actual temps and say one is better than the other, and in some respects that's true, but overall AIO's and aircoolers are the same thing, in their respective ranges. It all depends on the output of the cpu, the level of OC etc.
X32 = 130-150w = hyper212
X42 = 180-220w = cryorig h5
X52 = 230-250w = Dark rock pro 4
X62 = 250-300w = NH-D15
X72 = 300-350w = xxxxx
Those being rough estimations and cooler types. So a hyper212 and cryorig H7 are roughly same thing as far as capacity, the H7 is more efficient, gets lower temps. Same for the nzxt coolers, a X32 is about the same as a Corsair H60.
Common misconception is that to get OC, you need to use liquid cooling. Absolutely not true. Aircoolers will do the exact same job, and as said, quite often with lower temps. But the basis of that came from the popularity of 2 coolers, the Corsair H100 and Noctua NH-D14. The original H100 has higher capacity than the NH-D14, and back on the monster HEDT 140w cpus, add an OC and could easily exceed the 230w of the D14. Also ppl using 8 sticks of ram had serious issues with aircoolers. So OC became liquid cooling in most ppl minds. Same as AIO's got reputation for leaks and were very loud. Well sure, the original H100 was new(ish) and somewhat prone to leaks from the plastic hoses cracking or splitting and the Corsair fans were the worst on the market for noise, especially at the 2400+ rpm they ran at, compared to Noctua fans running at 1200rpm. Not really a very fair comparison Corsair vs Noctua fans.
Today's AIO's are quite different from those original disasters, as are the fans. The fans on my nzxt x61 could get somewhat loud, but so can the fans on my cryorig R1 Ultimate, if pushed to 100%. But running on silent mode, where the fans rarely ever got to 60%, the nzxt's were quieter across any equitable temp range. Same approximate temps, within 1°C or so, under same load conditions, but I did notice the volume change. If I bumped my OC back up to 4.9GHz, and @ 250w, for sure the 250w+ R1 would be suffering compared to the 300w+ 280mm AIO. At max.
Air or liquid is a personal choice. Sometimes it's forced by circumstances like case design, clearances, size of cpu, size of OC etc, but mainly it's still a choice.