I heard about the word territory in ancient Greece or The New Territories in Hong Kong. Is the word territory the same as a country or a nation? Could I said The USA is a territory or the UK is a territory?
No. You could not say that the United States is a territory. It is a country. You could also not say that the UK is a territory (it is also a country.) However, a place like Guam would be considered a territory of the United states. In general, a territory is something, that, according to Merriam-Webster:
A geographic area belonging to or under the jurisdiction of a governmental authority
Which also answers your other question, by showing how territories are not the same as countries, because some countries have territories that belong to them, but the territories themselves are not countries.
In addition, here is the link to my source: https://www.merriam-webster.com/dictionary/territory