How to make a lamp light only one object in the scene
You will have to create separate layers for each render,
elements that you want to be effected separately put them in different collection.

Basically you can create the whole scene and then duplicate the render layer, in one of them disable the view layer (right-click on the collection --&gt; View Layer --&gt; Disable from View Layer.)
Do the opposite on the other render layer.

Use the compositor to stitch the images together using Alpha Over node.

attaching a .blend file for you to review.