According to this article, New Hampshire Secretary of State David Scanlan says New Hampshire might hold its presidential primary at the end of 2023, instead of in 2024, if necessary to make the state’s primary the first one. New Hampshire Secretaries of State can set the date themselves. Scanlan will treat Iowa as a primary state if the Democrats in Iowa do let non-attendees cast a mail ballot. So that means Scanlan would be determined to hold New Hampshire’s presidential primary before the Iowa caucuses.
No state government has ever held a presidential primary in the year before the presidential election. The earliest government-administered presidential primary ever held was New Hampshire 2008 primary, held on January 8.