It depends on how far away from the homeland you get.
To the rest of the world, “Yankee” means “an American” (specifically, a citizen of the USA).
To a southerner in the USA, a Yankee is someone from the northern part of the country.
To those of us in New England, a Yankee is someone from one of the six states in New England (Maine, New Hampshire, Vermont, Massachusetts, Rhode Island or Connecticut).
And to people in New York, it’s a member of this year’s second place finisher (to be) in the American League of Major League Baseball.