yes, this is possible. you need to create 2 websites in Magento 2 admin and add Base url for specific website.
Also you need to create symlinks in second domain for these folders
Yes, it is possible to create 1 website with 2 domains. But make sure you purchase a subdomain to avoid content duplication so that your website can rank on the search engines.
Magento is best for eCommerce and that's why it offers you to easily utilize the Magento feature to use 1 store with domains.
Hope this information will help you!
Reach out to us for any queries or questions related to Magento web development.
Click KUDOS and accept it as a solution.