For setting up your DNS records for usage with Google Workspace and Microsoft 365 we'd like to point you to their own knowledge base articles. This information is subject to change and by using their own articles you can make sure you use the latest version of their configuration

Google Workspace / G Suite

Google Workspace shows the steps for DNS settings when you add a new domain or create a new account. They also have knowledge base articles to help you set up your domain: and

Microsoft 365 / Office 365

Microsoft 365 also gives you instructions on how to set up your domain while adding it to the service but they also have a knowledge base article telling you everything you need: