Hi.
A basic description would be:
create a render texture that matches the window size and fill with black,
draw white (or shades of grey) for where you want lighting (or some lighting - darkening - for grey),
draw everything as normal on the window,
create a 'render sprite' (that is, a sprite to display the render texture),
then draw the render sprite on the window over everything using a blend mode - multiply.
Multiply blend mode means that white parts of the render texture are left alone, black parts are blackened and grey parts are darkened, depending on how dark the grey is.
You should be adding the blend mode to the draw call, similar (because this is C++) to:
window.draw(lightingRenderTexture, blendMode);
The Blend Mode documentation:
https://www.sfml-dev.org/documentation/2.5.1/structsf_1_1BlendMode.php