enable Shadow pass
change Cubes material setup of Alpha mode to Blend.
create View Layer for
and one for all objects to composit Shadow pass
The trick here is Alpha Blend mode in material. Objects with Alpha Blend are not visible for Shadow pass ... technically Im not advanced in this area to explane ...
You've uploaded a video in the Video Sequencer. As the Output > Post Processing > Sequencer option is enabled by default, it will try to render this video strip. Remove the video strip or disable this option.
You probably need to:
Disable Output > Post-Processing > Sequencer, otherwise the movie that is loaded into the video sequencer will render, not your current scene.
In the Compositor, plug your Render Layers node (or whatever comes after) into an (Output) Composite node, otherwise nothing will be rendered.
TL;DNR: You need to render a View Layer consisting of just the background.
Here's one way I know how to do this is
Create your main scene with all of its collections but put the camera in a separate collection from everything else. Here's a simple scene with a Suzanne:
Optional: Give your main scene a name. I called this main.
Create a new View Layer ...
As mentioned in this bug report, this is a bug that has been around since 2.8 when using NLM denoising.
A description from the report:
Glare node bug when using NLM denoising
Occasionally noisy when using grain anodes in compositor particle
images. No issue with OIDN.
So it is best to use OpenImageDenoise instead of NLM for denoising to work around ...