I recently bought a no-name endoscope for 14 bucks, It came with an adapter to use it both with my phone (USB-OTG) and USB2.0. The picture quality is actually fairly decent, the illumination works on par with most of these types of cameras, and the cable is ridiculously long.
Here's where the downsides are. The cable is just a wire, like a USB cable. It's not sheathed, is very flexible, so it can't be aimed or directed in particular directions. It's better to attach the camera to a length of solid copper 14 or 12 gauge electrical wire to add stiffness. The other dilemma is the app needed to use the camera on the phone. The maker directed me to download a particular app. It worked, but it was infested with distracting ads that took up space that was better utilized showing the video. Ads would also pop up over the whole screen, making things far worse. I was able to track down an ad-free viewing app that worked with that particular camera. I detest such intrusiveness in ads, and they shouldn't be included with purchased hardware in the first place. The camera shows up as a more or less standard imaging device on Windows systems, and there are lots of options there.
It can turn out to be a handy gadget, and the price couldn't be beat.