Personally, I think now is not a good time to buy if one's interest is AI. You will likely miss a major hardware advancement "spurt" for AI.
Apple's major hardware advancement for so-called "AI" (it's not intelligence) was the A11 Bionic, the first Apple Silicon chip with a Neural Engine. That shipped in fall 2017, nearly 7 years ago.
M4's "AI" advancements are more hype than real, a concession by Apple execs that they need to be more visibly into "AI" so long as the bubble is bubbling. They changed the way they report Neural Engine compute throughput to roughly double the numbers relative to M3 and before, bringing the way they measure this throughput number more in line with what the PC industry is doing. However, if you measure the same way on M3 and before, those chip's numbers double too, and then M4 looks like a minor bump over M3.
Same goes for the "AI" improvements to the CPU - M3 and earlier had AMX, the direct ancestor to M4's SME. The only new thing is that now it's been formalized as an official Arm ISA extension so that Apple can expose it directly to third party software. However, Apple's CoreML framework should be able to use AMX on earlier CPUs, so it's still not as huge a step change as you might think.
The irony of Apple being painted as behind on "AI" until the 2024 WWDC is that Apple's actually been way ahead. They've followed a much more sober path than the bubble companies like OpenAI, building smaller features that are useful and reliable (Face ID, OCR so you can copy text out of images easily, classifying images in your Photos library, etc) rather than obsessing about building flashy but flawed BS and plagiarism generators like ChatGPT. (Speaking of which, it's disappointing on a moral level that they cut a deal with OpenAI at all, but at least it apparently involves not even paying OpenAI and should be very easy for Apple to back out of once the hype bubble pops.)
So, Apple doesn't need a revolutionary advance in on-device "AI" compute. What they've got is fine, and incremental improvements on it in each generation are fine. Unless you're all-in on the hype and think your plastic pal who's fun to be with is right around the corner, don't wait for something better. (If you are convinced of that, please consider becoming wiser.)