Mexico is part of North America, not Central America.
Mexico lies south of the USA and north of Central America. The Isthmus of Tehuantepec (Mexico) marks the northern boundary of Central America.
Confusion arises because Mexico shares cultural/historical ties with Central America, but geopolitically and geographically it is North American.