.gov (.gov.us) is used in the US to distinguish between commercial sites and sites run by state, federal, and local government institutions. It helps cut down on fraud. There are a few fucked up government sites in some states that use.com because ICANN isn’t doing their fucking job.
There’s also .mil for military sites. And .net for internet service providers. These were the original oldie domains. I’m not opppsed to adding .blog to the list, but I despise all of these confusing random cash grab domains that ICANN approves these days. “.social” is really just an org, and “.biz” is really just a com.
.gov.uk actually exists. So yes, countries outside of the US use .gov.
https://legislation.gov.uk
https://www.nationalarchives.gov.uk/