Google’s John Mueller tweeted about how Google geotargets search rankings across the world. He wrote, “For geotargeting we use mostly the ccTLD or search console setting, so place the server where it works best for you.”
Earlier Google would use the location of the server to determine the ranking of a website. However now Google uses ccLTDSs(country code top level domain), which is domain extension like, .za, .uk, .in.
If you want your site to be to ranked in a particular country, having a location specific domain extension helps.
It is also suggested to adjust Search Console settings according to the country you run your business in. There are many other ways to Google understand where you would want your site to rank, Mueller’s tweet suggests that ccLTDs and Search Console setting are the most important ones.