I'd start by removing the architrave (and the beading on the other side. You may be able to pry it off with a metal scraper or a wide old chisel never again to be used on wood.
This will expose the gap between the door lining ("frame") and the wall.
it is likely bits of broken plaster and brick are lodged in the gap. Scrape them out as they will prevent it being pushed back into place.
Pull off the doorstop strip on that side. Very likely you will see the heads of fixing screws concealed under it. Undo them. There are probably some more hidden by filler and paint. You will be able to see where they are now you have pulled off the architrave.
Put your knee against the lining, and your back against the other side. Can you push it back into place? When you can, you have removed the obstructions. It will probably spring back out, don't worry about that. it is best to take the door off its hinges so its weight doesn't pull on the lining.
You will probably need to drill new holes for screws and plasplugs into the wall. You can get "frame fixings" which are extra long and can be drilled right through.
Before you finally tighten them, get a
spray can of Expanding Foam (I prefer the pink fire resisting grade). You will squirt it, using the plastic injection tube, into the gap between the door and the lining immediately before you do up the screws. It will glue the frame to the wall, and is slightly resilient to absorb vibration or bangs. Moisten the gap with water using a plant mister before squirting in the foam, the damp improves adhesion and setting.
Cover the wall, door and floor with clingfilm or newspaper as the foam is very sticky and goes everywhere. You will need lots of disposable gloves, and old clothes.