Check out Davinci resolve video editing app ( it's free)
there are 2 really useful features: 1 Depth masks from a 2d image.
2 relight which generates a crude 3d mesh from a photo then allows you to relight it.
it's a tool used a lot of film Visual effects to add interactive lighting.
this youtube video shows it in action, in conjuction with depth maps to control the effect on the foreground:
https://youtu.be/h9U3rrvGa40?si=Nu65orbssd2ldXQm