@b4cks4w loadsa apps for that but finding one that is privacy focused is hard
i would use an IP webcam
IP Webcam turns your phone into a network camera with multiple viewing options. View your camera on any platform with VLC player or web browser.
there are loadsa IP webcam apps also
https://www.makeuseof.com/tag/ip-webcam-android-phone-as-a-web-cam/
IP Webcam
/nosanitize
https://play.google.com/store/apps/details?id=com.pas.webcam