The road is the best place to be. On the pavement you will encounter the erratic movements of pedestrians who seem to think they have the right to be there and stop without indicating and change direction without considering that a cyclist or driver could be trying to get past them at speed. In the road the drivers and riders of other vehicles should have the rudimentary skills and knowledge to be aware that there maybe other road users out there. Even on shared use paths you will get pedestrians who wander out of their allotted lanes.
You can make the road unsafe for yourself by riding erratically and failing to understand the rules of the road. As long as you are aware of what is going on around you (and as a cyclist you will have greater all-round vision together with hearing that is not restricted by being in a metal box) and understand that your position on the road will influence and even control the behaviour of others to your advantage.
Cyclecraft and
Bikeability are good starting points if you are unsure.
There are many stories of cyclist (as well as drivers and pedestrians) having accidents but these really are very small numbers compared with the road users that don't have problems but have very safe and uneventful journeys. My last accident of any kind was in 1976 when I was left hooked. I got up and rode off with no damage to me or the bike.
When I was learning to drive a good friend gave me a piece of advice:
"Remember Pete, everyone out there on the road is an idiot, and everyone out there thinks you are too."