Germany in general and Munich in particular are very safe. Most of the hostels are located near the train station, which is considered "seedy" for Germany, but it's still safe. I stayed in a decent hostel in that area - unfortunately I don't remember the name, but they're all pretty similar from what I understand - and it worked out great.
Another, even cheaper option is "The Tent." It's a large hostel/campground out towards Nymphenberg Schloss.
The upsides:
-Very cheap
-Cafe/bar and campfire area is great for making new friends, lots of young travelers
The downsides:
-Accommodation is in a bunkbed in a giant "circus tent". People are coming and going at all hours and using the creaky metal lockers so earplugs or being a deep sleeper is a good idea.
-Location is around 20 minutes from the center of town via tram and a 10 minute walk, although it's a nice, quiet neighborhood that probably "feels safer" than the area of cheap hostels near the train station
I would have loved it at your age, unfortunately I went when I was already in my mid-30s and was already used to more comfortable accommodation so it wasn't great for me. But if you want a more intentional travelers community and cheap prices, it's hard to beat!