When it comes to writing just about any genre, there are 2 simple tricks that will work for all questions of this sort.
1. The best teacher on how to write a given genre are writings within the genre itself. Just read A LOT of material from within the genre in order to get a feel for the tropes, conventions, and expectations of the genre. Thing is, in order for this to work, you can't just be reading passively. You have to read critically and really work on identifying the key features and noticing how various authors implement them in their own way.
2. In service of tip #1 on this list, try to identify the core essential elements of the genre. Once you have identified those core essentials that must, in some way, be included in your writing then you can begin figuring out how to apply those core essentials with a bit of your own style. (which, if you are properly following tip #1, shouldn't be too jarringly far off from the genre standard at this point.)
In the case of horror in particular, I have identified a few of the core essentials mentioned in tip #2.
1. There is some kind of personal-level threat. No global, or even city-scale threats. The threat must be isolated and even somewhat directed at the small group of people in the main cast whether by geographic location or for being personally attached to a member of the main cast.
2. The threat cannot be easily fought off with conventional means. The threat is either so overwhelmingly more powerful than the members of the main cast that a simple fight with conventional means is not enough to overpower it, or otherwise the creature either sneaks into a blind spot in the party heavy-hitter's power set or disempowers anyone able to put up resistance in some way.
3. The threat must be fought off with clever thinking or simply surviving long enough to find help, and the struggle must be rather fraught and desperate.
4. The author must, using some kind of writing technique, portray the terror felt by the members of the main cast and get the reading audience to sympathize or empathize with it.
On a personal note, I think one particular horror genre series that might really open your mind to where the horror genre can go would be a series called "Tremors." In terms of the monster and how the main cast's interactions with it go, it is a horror monster movie by every respect of the word, and it fits the genre standards to a T. However, the way the main cast interacts with one another somehow turns this survival horror against monsters that pop out of the ground and eat people whole manages to turn into a comedy purely due to the banter the main cast throws back and forth.
It's probably not what you are planning to write, but I think it's valuable watching anyway just so you can disect it and figure out the horror elements and what about it makes it somehow come off as so light-hearted despite the very real threat of death everyone's facing.
"Tremors" is done so well, in fact, that I often enjoyed watching it as a teenager and it wasn't until the tenth time I watched it that I suddenly realized, "wait a minute, this movie actually fits the text-book definition of a horror movie!" I literally didn't even notice that it really was playing out exactly like a horror movie would at every single step due to just how much fun I was having watching the stupid antics of the main cast.