A peephole camera or similar to those in “secret camera” clocks or such would work. Often they are motion triggered.
Legally you’d be on tricky ground.
However, 20 years ago or so I fitted a camera for a mate. She has a second floor flat with a big landing outside. The landing is effectively only for her flat, as the stairs up to it only lead to her landing/ front door.
infitted a shop type PIR to beep when someone comes upstairs, and a camera that views outside.
She had thought that she heard people outside her door and preferred to not open the door to find out.
There was a peephole, but its coverage was sucjh that someone could hide.
my camera covered the whole 10-15 square metre space.