Unless your desired domain name is one that you can imagine someone else wanting, you are more than likely ok to wait until the website is ready to publish—and then, if you purchase the hosting plan and domain name together, the billing will always be at the same time of year (which reduces confusion when you get invoiced later).
That said, if it gives you peace of mind to have the domain registration in hand, by all means—it’s a small expense and it’s fine to purchase it in advance.
It’s a good idea, nevertheless, to purchase the domain registration through the hosting company you are going to be hosted by (again, it reduces confusion) and in this regard, two hosting companies we highly recommend are:
Of the two, Dreamhost is better for site speed and security but Bluehost’s control panel is more user-friendly for non-developers (which makes a difference if you are likely to want to manage things there yourself). Both companies offer a large discount for the first 1-3 years of hosting if you pre-pay it when you sign up.
With either company, you only need the most basic hosting package offered (you’ll see three packages in both cases). Unless you really want domain privacy (which means no one can know who is the owner of the domain) you can uncheck the option for domain privacy. And if you can commit to using strong passwords and also keeping your website codebase maintained, you don’t need any additional backup option offered. You should also not check “WordPress website builder”—as, although we build on the WordPress engine, we don’t use the DIY templated systems that come with that. We’d build your website on our server first and then move it, whole, into your hosted environment when it is ready.