Problems : having a spotlight-shone area have a certain stencil value, with a g-buffer.

I want to implement a feature where there is a stencil value change in the area to which a spot light is shone. I’ve heard of Shadow Pass Switches, but it did not quite fit the direction I was going for. Essentially, I want a shadow catcher / shadow pass, but with dynamic spot lights.
Can anybody help me in guiding me to it?
Below are some images for reference!


which will render the stencils to