If you want to build a website but do not yet have a domain name, you can still develop your website locally on your computer or on a development server using a local IP address. This will allow you to create and test your website before purchasing a domain and publishing it on the internet.
Once you have developed your website, you can purchase a domain name from a domain registrar and then host your website on a web hosting service. You can then connect your domain to your web hosting service by updating your domain’s DNS settings.
Keep in mind that without a domain, your website will not be publicly accessible on the internet, so it is important to purchase a domain and hosting service when you are ready to launch your website.