Once you've got an idea for a website, let's say for a new business venture, then you should be considering what keywords you want to be found for and the very first step should be to have some keyword research done to find out:

a) What keywords are relevant. There may be some that you haven't even thought of!

b) How many searches per month are being performed for these relevant keywords in the UK. (The same applies to other countries).

c) The level of competition for each keyword. (It might be easier to rank for a less competitive keyword).

Once you have that information and you have honed in on your main keyword it is time to consider what domain name to buy. I say "buy" but really you are just renting it until such time as you decide to stop renting it and then it becomes available to someone else to use.

The domain name is also part of the URL of a website. In the case of this site you are looking at now, I bought  "websitesyork.co.uk" as the domain name and then this is prefixed with "https://www" to give the full site address or URL.