Mexico does not require a US passport to have remaining validity beyond the date of travel.
As of June 1, 2023, if you are a U.S. citizen traveling to Mexico, you must present a valid U.S. passport book at the port of entry. A U.S. passport card cannot be used to enter Mexico.