
I think the most important thing is to know your players. Discuss often about what they want for their characters, and try to not build the game around one or two of them because that’s the way you want. In addition, know when to improvise. Whether you’re doing a prewritten or homebrew, being able to change things on the fly to fit what the players are doing is vital, especially when they inevitably derail the campaign
Host a session 0 to go over boundaries! My table banned Spiders in the campaign due to The Incident™ and it was truly the best table I’ve ever been at. My current DM also does regular check ins when we get into uncomfortable territory. My character got his mind wiped temporarily and my DM pulled me aside to plan out what would happen next, he said “[BBEG] is a really cruel person, she’s going to give a collar to another member of the party and tell them they should keep their pets on a leash” -