Recognizing there are multiple types of predators out and about, even in urban settings, I involve several approaches. First thing is some breeds are poorly suited for free-range keeping owing to small size, limited physical ability, or inability to see well. Silkies, polish, bantams and other smaller fluffy-butted breeds should not be out dodging hawks or foxes. Secondly, only part of flock is released at a time so losses not complete when a complete loss is not acceptable. I breed all my own replacements as purchasing more of what I have is not possible. Thirdly, many of the free-range birds are released only during the latter part of the day to keep them from ranging as far. The birds get most of the benefits of free-range while proportionally reducing losses with respect to time outside and vulnerable. I also spend time out and try to keep chickens concentrated in my dogs' sphere or awareness in the evening when the latter or resting up for night when they work the hardest. The subset of birds out all the time are thus less likely to go more than a hundred yards or so. Those birds out all day are expendable yet seldom lost. Then I make so the birds have a habitat that provides cover and good seeing. Cover is most important with hawks. Some hawks like Coopers Hawks will chase hens and immature chickens on the ground into heavy cover so I like to have fully adult standard-sized roosters that shut that down very well. We have fencing, especially electrical, that complicates life for foxes and coyotes looking for an opening. Then my big guns are dogs that free-range with chickens around the clock and that know what chicken alarm calls mean and respond appropriately. I have used traps directed a Red Foxes and taken out a small number with that approach although those takes have all been at night. The fox will get a bird once in while during and dogs will then step up their game in that area. We had a fox come in a couple times to take a couple chicks during the day causing dogs and chickens to make adjustments causing losses to stop even though chickens still free-range.
I expect to loose a few chickens every year to predators and that is built into my breeding program. If your flock size is small, then losses to predation are much more impactful so you may want to reconsider the practice. Free-range keeping is cheap on containment and sometimes on feed if you have good ground (mowed lawns ain't good ground), but is cost in you having to be more on your toes and being willing to make changes in your chicken keeping as needed.
Many people get set in there ways pretty quick.