But you more or less have to get on the ballot at all, which is much easier if you're endorsed by a party. That requires connections, is aided by corruption, and doesn't require a public vote.
During the most recent NYC gubernatorial elections, eight parties had "automatic ballot access" due to getting enough votes on their party line from the last election. One of these eight is the "Women's Equality Party," created by Cuomo and his running mate Kathy Hochul in 2014, when Cuomo was already governor and running for re-election.
Those eight parties ended up nominating three candidates: four including the Democrats nominated Cuomo, three including the Republicans nominated Marc Molinaro, and the Greens nominated Howie Hawkins.
Two other parties without automatic ballot access were able to get onto the ballot - the Libertarians and the new "Serve America Movement" party. 15K signatures are required to qualify. The Libertarians got about 30K signatures and 95K votes; the SAM got about 40K signatures and 55K votes. There were also about 7K write-ins. Meanwhile, the two major nominees got millions of votes each.
It is technically true that an independent or write-in candidate could win. I don't think a write-in candidate has ever won state-wide office in New York. One write-in candidate has achieved federal office in recent years, but it was an extraordinarily special case that does not back up the general idea that write-in candidates are viable: incumbent Alaska senator Lisa Murkowski won re-election in 2010 after losing her primary.