For decommissioning your on-premises Exchange environment, refer to https://learn.microsoft.com/en-us/exchange/decommission-on-premises-exchange
For decommissioning your on-premises AD environment (which you might perform once you complete the decom of your on-premises Exchange environment), refer to https://learn.microsoft.com/en-us/entra/architecture/road-to-the-cloud-migrate
If the above response helps answer your question, remember to "Accept Answer" so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.
hth
Marcin