Usually, local laws are enacted by a city council with members elected to represent different areas of a municipality (and potentially some at-large seats). Legislation can come from a number of places: lobbying efforts (for example, there's a current effort for municipalities to ban data center development), citizen groups, specially formed committees (my city just had one to create and propose city charter revisions), or yes, occasionally the council members themselves. Typically, there are open council meetings where citizens can discuss their opinions.
In addition, some rules/regulations/taxes are directly put to a vote of the city/town population, and some regulations can be put in place by administrative departments in a locality. (Similar to things like EPA regulations on the federal level).
The specific implementations vary in accordance to municipal charters and how specific states handle the incorporation of local governments.
This likely doesn't even require a new law. There is probably an existing law against deceptive advertising in renting. This is just the mayor announcing that he will interpret the existing law to cover AI generated staging images.
As a general rule you probably don't need new laws to penalize behavior you think should be penalized, there are more than enough laws where a good faith interpretation would fit.
It's possible someone might challenge a rule if they think it oversteps the authority granted.
I suppose landlords if they think it is very beneficial to use AI to get people to pay more for apartments might fight back, probably free speech or some such thing, some landlords might just do it because they dislike Mamdani.
Anyway I'm not sure if they would need to update much, just issue statement "using AI to create an image that cannot actually happen in reality for an apartment by.. (long winded description follows) is obviously deceptive and falls under current regulations and laws and we will be prosecuting it as such" - this would of course be determined by how things work in NY specifically.
I think an actual law does have to be passed to enact the part literally banning all AI imagery on a five boroughs basis, as opposed to just penalizing inaccurate AI genned imagery... which afaik is municipality based. Pretty sure the City Council needs to codify that.
Not sure who would be responsible for enforcing it on pretty much every site in the world that isn't just the real estate broker or building management/etc, though. Would places like rent.com be legally responsible?