Think of your website like a digital home.
You need land for that home, right?
So your domain is the land.
Your website is the house.
And your hosting is the utilities used to power your house. Like electric and internet.
There are so many hosting companies out there and most of their technology is pretty much identical. Sometimes they provide digital land (aka domains) too. The biggest difference between them is their customer service and their security. Think of your internet service for a second.
You know it's possible to be hacked, phished, infected by unscrupulous code or people on the internet.
The same can happen with your website hosting server (aka your digital home's internet).
If your server has poor security, your website can be infected or hacked. And your visitors can then be infected or hacked.