Let's imagine that we already know how to create a basic module
Now Lets go ahead and take for example Magento_Contact module and their FrontName
First, etc/module.xml of your module's make Magento_Contact
as a depended module.
And then changes frontend name from routes.xml at etc/frontend/.