Typically you would use your own domain name(s) although, in the case of Microsoft 365, you are given a subdomain of 'onmicrosoft.com' as well which is useful for testing.
And MS365 does offer trials (usually 30-days but some can be extended to 60-days) of their licenses and you only need to license physical mailboxes (in a typical setup this would be per user); shared mailboxes and distribution lists/groups aren't licensed but they
need to be assigned to a licensed mailbox/user. Small Business licenses -
https://www.microsoft.com/en-gb/microsoft-365/business - 'Basic' is 50GB mailbox, 1TB OneDrive and online apps; 'Standard'/'Premium' also includes desktop MS Office suite apps and other features.
Google Workspace is similar.