How can i achieve this kind of lighting?

I’ve been thinking that there would be a mask in front of the camera and that light sources would make transparent holes in the mask, but i don’t know how to execute this.

I’m working in 2D and would like for the crisp pixels to remain intact rather than have a gradient to black.

sorry if the solution is obvious, i’m still a newbie

Check this out. I have made a small package for you.
https://www.dropbox.com/s/fysju9vztjio8vy/testScene.unitypackage

Though you have to make appropriate texture for this. as this is demo I have not made it perfect.

Let me know if you want any other thing.