A hosting company helps you to host your website content files and you can use their server space. Domain registrars reserve the domain name which you registered and point that domain name to your chosen hosting.
You can register a domain name with a hosting company or registrar but it does not matter whichever way you choose. It is up to you to decide.