Syncing of mails will occur between iPhones / Mac / iPad when Apple ID is signed as example1@icloud.com " only "
If you are using Apple ID created with gmail services the mails will not sync .
When ever a mail is deleted from a device it deletes from its mail application ( it could be Mac or iPhone ) , if you delete mail from iPhone it will be deleted from iPhone and not from your Mac see the articles https://support.apple.com/en-us/HT208661
https://support.apple.com/en-in/guide/mail/mlhlp1001/mac
If you enter www.icloud.com with Apple ID and password using a web browser the mails from all devices are synced as mail application is configured / turned as on https://support.apple.com/en-in/HT201320
Same way for Mac , the Apple ID is signed in system preferences > iCloud https://support.apple.com/en-us/HT207689
so viewing the universal iCloud.com account for all you devices the mails can be read https://support.apple.com/lv-lv/guide/icloud/mm6b1a0b80/icloud
And deleted from iCloud.com https://support.apple.com/en-in/guide/icloud/mm6b1a7ab7/icloud
But that is different mail you read from one device and delete from it will not delete from Mac / iPhone , however you delete the mail from iCloud.com it will be deleted from the server and will be mirrored ( deleted from all devices ) .
Syncing of mails is done with same Apple ID example1@icloud.com , deleting of mails / reading will be from single device .