This depends enormously on where you are. Cities like Amsterdam, Copenhagen, and much of the Netherlands and Denmark have superb protected lane networks where cycling is often the fastest way around, and drivers are trained to expect bikes. Many German, Japanese, and Nordic cities are similarly comfortable. In these places even nervous riders do fine.
At the other end, plenty of cities paint a line on the road and call it a bike lane, or have no infrastructure at all, and cyclists share space with buses, scooters, and aggressive traffic. In much of South and Southeast Asia, cycling in city traffic is genuinely for the confident only.
Before renting, look at how many locals of all ages are cycling. Lots of ordinary people on bikes, including kids and older riders, is the single best signal that the infrastructure is safe. If you only see delivery riders in high-vis weaving through cars, stick to parks and riverside paths, or join a guided cycling tour that uses quieter routes.