Last I looked into this Frigate was the most robust path to take, they recommend cameras that are about $50-$100 each but in my playing around I connected a Yi camera ($10) with custom firmware.
That said it was all a bit over my head and I had trouble connecting it to home assistant and gave up
I would love a follow up post with whatever setup you go with!