As @erindwyer.bsky.social mentions below, these laws were gradual with the enslaver in mind, to blunt the economic impact of freedom.
New York had the most slavery in the North, and it didn’t fully end until 1827! However most enslaved people had self-emancipated and moved to the city by then.