Is it important to choose the correct TLD (domain extension) in 2018?

Hello,

I was wondering what people thought about domain extensions (TLD).

Is it important in 2018 to have the correct top-level domain extension, for example, if it is in the United Kingdom? Is it the best practice to have a .uk or .co.uk instead of a .com for example?

Does the general public look at the end of a URL and think that .com is American or .co.uk is for the United Kingdom?

I keep an eye on your thoughts.

Tom