RE: can I export mail rules from one Mac to another?
Yes. It is definitely possible I have just done it in Monterey.:
There is a pre-existing question that I can't comment on because it's from a few years back where someone wanted to manually transfer mail filtering rules from one Mac to another.
One answer suggests moving MessageRules.plist but that is not sufficient because the message rules all have individual unique ids and these are also listed as to whether or not they are active in another plist.
If you want to copy mail filtering rules from one mac to the other you need to:
quit Mail
delete these files in ~usr/Library/Mail/V9/MailData/
MessageRules.plist
RulesActiveState.plist
SyncedRules.plist
UnsyncedRules.plist
replace with ones copied from old mac
restart mail
This is for Monterey. Folder name will be V10 for sonoma. I have looked inside the files generated by V10 and they it be exactly the same format so although I have not tried it you should be able to transfer them from Monterey to Sonoma as well.
Mac mini, macOS 10.13