If your ancestor’s death record says they were born in Hamilton, Illinois, is the reference to the city of Hamilton, Illinois, which is in Hancock County, Illinois, or is it a reference to Hamilton County, Illinois, with the word “County” omitted? Hamilton County is in southern Illinois and quite a distance from Hancock County where the city of Hamilton is located. There are many US locations where a town has the same name as a county but the town of that name is not located in the county of that same name.
It’s not just the United States where the same name can be used for political jurisdictions that serve different purposes and where the smaller jurisdiction is not located within the one that is larger. Even if the smaller jurisdiction is located within the one that is larger, don’t assume that a reference is to the smaller jurisdiction.
The problem can be compounded with jurisdictions in foreign countries as record clerks in the United States are not necessarily going to be familiar with jurisdictional structure in Ireland, Germany, England, etc.