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?

If you don’t have your camera running 24x7 that means you have to wait for it to boot up before it records any video. With my IP cameras a reboot takes about 30 seconds which is a lot more delay than I’d want before starting a motion-triggered event. It’s more usual to want a “pre-roll” buffer anyway, so you save some video from before the trigger point, of course in that case the camera must be always running. One standard IP camera takes about 4 watts by my measurement (not including IR lights at night time) so it’s not a huge power waster. I use “BlueCherry” DVR software (now freeware) on Linux. I repurposed and reflashed an old Chromebook which does the job without using too much power. A fanless miniPC box like Compulab Fitlet2 could work also.