I think Kay51 have given you some good advice. I second the recommendation of a canal tour. In addition to Stromma, there is also Netto-bådende, website: havnerundfart.dk. Just go on one of the harbour tours, not both - just know that you have the option of the two companies.
Depending on the time of year you are visiting, you may also have some decent hours of daylight left when you arrive in the evening. You could take advantage of that - as long as you are not too exhausted from your flight.
Copenhagen is one of the safest cities you could go to - so I wouldn't worry too much about the safety aspect. Of course use common sense as you would anywhere. Then you will be fine.
You could also go to Tivoli, if that feels like a must for you (but it isn't a must for everyone). It is not open year-round, but is open for large parts of the year.
Nyhavn is a tourist trap. Nothing wrong with eating there, you just run the risk of paying premium prices at a subpar restaurant. But you'll get to eat in an iconic and central location. So as with most things, there are pros and cons.