The webcam tutorial says that USB gadget mode can be used on any Pi, but it's only Pi Zero, Zero 2, and Pi 4 (USB-C connector). It can't work on the others as the USB ports are on the wrong side of a USB hub.
Needs fixing up. Forum thread at https://forums.raspberrypi.com/viewtopic.php?t=355020.