There is a Kurzgesagt video about that:
https://www.youtube.com/watch?v=JyECrGp-Sw8
If you detonate all nukes you could destroy every city with population of over 100'000, worldwide. About 4'500 cities in total. You would still have around 1'500 nukes left. You would kill at least 3 billion people.