Stick to daylight hours, be familiar with the problematic areas to enter, and be aware of your surroundings. Most tourists who get in trouble do so at night when they're drinking. I assume the second part of that won't be a problem for you, but the first can get you in trouble.
For example, one of the most beautiful things I've seen in my life is the view from Pão de Açúcar at dusk into early evening, but that means you'll be leaving and going back to your lodging at night. Come down on the gondola before it gets super late and take an Uber back to your lodging.
If you're traveling elsewhere in the state of Rio de Janeiro, I enjoyed Paraty, and Ilha Grande is beautiful and super chill. A little Portuguese would help, which you can pick up quickly if you have some Spanish.