I am looking some like the popup camera of the Oppo F11 Pro that can be connected via USB-C. Here is an example:

I think something exactly this small would be impossible as most of its connections, board and circuits are inside the smartphone. So, maybe even a little bigger would be fine as long it would not be just impossibly massive like normal webcams are for my use case.

All I need it for is to scan Pokemon TCG Live codes from booster packs I open while not at home. So for video quality as long as a QR Code is readable its fine.