Can I use PIR to trigger Camera Recording

I don’t know much about HA + cameras, really, but I recently saw Wyze and the more I think about it, the more it seems unnecessary for me to have an always-on 24x7 camera running, and, if trying to avoid cloud services, then it seems needing to have a Blue Iris or similar install running seems overkill as well, when really, I just want to record X seconds when motion is detected…

So, instead, is there a way to have a cheap, non-cloud, IP camera that can activate (and record) only when a separate PIR motion sensor is tripped? Bonus if it could also activate on-demand for streaming (like, streaming to a card when I open HA).

I don’t know anything about Wyze, but there seems nothing difficult in having IP camera to record on signal from PIR.

On the other hand, the important thing to consider is reliability of your resulting system.
What if your HA hangs when you’re away?
What if the SD card fails?