I have two email accounts that use IMAP, and both of them failed on ios 18 and ipadOS 18. In some other threads on the discussions, many people are trying things -- some have temporary luck, and some report that deleting accounts and adding them back doesn't fix it. A few have reported that turning off SSL in the advanced settings for the mail account works, but most IMAP servers are set to accept only secure connections -- mine are this way, so this doesn't work for me.
I have an ipad still on 17 and it has no problems with either account -- the devices I upgraded to ios 18, stopped fetching new mail when they were updated and none of them have been able to get new mail at all. Only that one ipad on ipados 17 and my macs can get mail. I'm convinced it is definitely a bug in the ios mail app and for me there is no workaround and I've tried all the ones suggested in the numerous threads, blog posts, and tweets about this issue.
best thing to do, and @KiltedTim was good to suggest this in another thread is to go to apple.com/feedback and report the bug.