They’re not for everyone. They function at about the level of a 4yo. 50lbs of feed will run you $20. If you’re fenced and let them roam, you use less feed. Straw. Mite prevention, which is food grade diatomaceous earth/powder. Water bowl heater for winter months.
Most municipalities allow for backyard chickens, 3-4. Roosters are another thing. They crow whenever they like and may hop/fly up where you don’t like them to be just to crow. I haven’t had issues with aggression, but they can be aggressive such that a posted beware of rooster sign will probably be believed.
In my experience chicken enforcement is rarely a thing as long as you don't have a million and dont let them roam all over the neighborhood, just got to be smart.
But roosters are a sure fire way to get your neighbor's angry so I would suggest never having roosters if you live in city limits unless your neighbors are real cool.