Stuck on Layers/ Compositing

Greetings. I’ve been setting up an interior of a lounge room with many objects into a scene unbaked and unwraped with a simple pan from the camera(220frames) but when i went to render the animation i got presented (out of memoryCUDA)error so I came to splitting up the scene from Backround walls and floors then all other objects into another layer. When i was finished rendering i managed to overlay both clips into one, but i had lost all shadow interactions with objects and the backround. Im not sure how to re add the shadows I’ve had now seen shadow catcher but I’m not sure how to make a clip out of it please help.Thank you:o