Tossa de Mar is a tourist town with affluent visitors. Therefore, safety in Tossa de Mar is well thought out. In addition, the city is small, so all residents and tourists are literally in plain sight. This is also a deterrent to crime.
But still you should not forget about elementary safety rules. At markets and in crowded places you should not show expensive things. Always carry a small amount in your wallet for one walk, and keep the main funds in the hotel safe. Try to avoid crowds. Sometimes petty thieves deliberately provoke a crowd to make it easier to check the pockets of tourists. In case of theft, always contact the local police.
Also, follow all safety rules during boat and yacht trips, in particular, use a life jacket.