The website is the top-level container for sites, shipping methods, payment methods, and so on. And if you want to create completely separate sites that do not share cart, shipping methods, and so on, it is obligatory to create separate websites that will use the same domain or different domain. Thus, today, I will point you how to setup multiple websites for Magento 2 stores in the right way.
Stores > Settings > All Stores.
Create Website, then do the following:
Namefor the website by entering the domain of the new website.
Codefor the website that supports lower-case letter, and any combination of letters (a-z), numbers (0-9), and the hyphen (-) character.
Sort Orderthat is position of the new website in the list if necessary.
Set as Defaultcheckbox if you want to use it as the default website.
Save Websiteto complete.
Get the guides to setup the Store URLs here.
Ref: Magento 2 User Guide
It comes to the end of tutorial: How to Setup Multiple Websites in Magento 2.