This fundamentally involves decisions only you can make.
The iMac is massively better than the MacBook Air M1 2020 and the MacBook Pro M1 2020.
The MacBook Air M1 2020 and the MacBook Pro M1 2020 are massively better than the iMac M1 2020.
The former if you’re stationary, or need or want a bigger display, and the latter if you’re routinely mobile, or need to lock away the Mac, or whatever your particular needs and preferences and trade-offs might be.
I’ve worked with more than a few folks that lied to themselves and bought a laptop here, too. And then never took it anywhere. Ever. Which was a particularly bad trade-off, in terms of price and capabilities and costs. How often you will haul the laptop around is all part of that decision and those trade-offs, too.
As for the graphics, a 24” screen is immense when compared to a 13” screen.
All models here use the built-in graphics of M1, so all graphics are entirely similar for similar M1 tiers.
For various folks, an iMac and an iPad can work well as an alternative, the iPad with or without a keyboard.
You’ll want to budget for a hard disk drive sufficient for Time Machine, or for a NAS with Time Machine Server support if you have the budget for that.
I wouldn’t buy Apple silicon with less than 16 GB memory, and would buy more storage than is currently necessary as Apple and app and my own usage is all only likely to increase over the lifetime of the Mac.