Many people don’t realize that these are two separate things.
A Domain name is the address of your website that people type in the browser’s URL bar to visit your website. In other words, if your website was a house, then your domain name will be its address.
Web hosting is the place where all the files of your website live. It is like the home of your website where it actually lives.
A good way to think about this is if the domain name was the address of your house, then web hosting is the actual house that address points to. All websites on the internet, need web hosting.
Domain names and web hosting are two different services. However, they work together to make websites possible.