depends on the API and operating system. some OSes negotiate when multiple programs want data from the same camera (possibly for different resolutions and frame rates). other OSes/APIs don’t do that.
I think Apple is one of those that allows multiple consumers.
I think a “virtual webcam”, as used with OBS Studio, on Windows at least, allows multiple consumers.
if you need this regardless, you need to make something that accesses the webcam and distributes the data to the consumers, via some means of Inter-Process Communication (IPC). probably usable: ZeroMQ with the python module that conveniently wraps numpy arrays.