Sending, receiving, and organizing email in Outlook on the web for business
As far as I know, shutting down the website itself would not normally affect your Microsoft email service, since website hosting and Microsoft 365 email are separate services. As long as your domain registration remains active, your Microsoft 365 subscription remains active, and the required DNS records for email (such as MX, Autodiscover, and SPF records) remain in place, you should be able to continue using email with your domain.
The only additional consideration is whether your website hosting provider also manages your DNS records. If that's the case, you may want to confirm that canceling the website hosting service will not remove those DNS settings. If necessary, DNS management can be retained or migrated to another provider to ensure email continues to function normally.
Otherwise, no additional Microsoft 365-specific steps are typically required.
Reference: Domains FAQ
Please feel free to correct me if I misunderstood your request. If you have any additional concerns, feel free to comment below. I would be more than happy to assist.