'Best Quality' is a whole can of worms It's not just about quality, either (though a high percentage). You want a camera with the following features:
- Good resolution - too high will lead to issues if you are streaming and printing from a raspberry pi. Obviously something like a 3B+ will do better than a Zero, and Lan works better than wifi, so you have to take your current setup into account. Remember, if you double the resolution (say 1080P to 4K) you actually increase the number of pixels by 4X. For a PI the information from the camera has to move from the camera to the pi, then back out through the wifi or lan. Since the PI shares IO bandwidth for all devices, this can quickly gobble up available IO.
- Flexible positioning - Most people will move their cameras around, so it's nice to have a cable that's decently long with good mounting options (standard mounting screw is usually great!)
- Built-in compression - You want the camera itself to perform compression, else your pi will have to do it.
- Ample Camera Configuration Settings - Some cameras support auto and manual focus (huge if you want a sharp image), zoom/pan/tilt (sometimes software based, sometimes mechanical), auto/manual white balance, etc.. For Octoprint you may sometimes want automatic settings (ease of use) and sometimes manual (full control, e.g. for timelapses)
- Image Quality - Beyond pure resolution image quality is a concern. Some cameras work better in lower light conditions. Some have better color accuracy. A lot of this is just 'matter of taste' stuff, some is a function of the camera itself.
You might even consider a camera that can stream natively. Some cameras (foscam) have built in streaming servers, and some include actual pan/tilt/zoom, which would be pretty nice. This could be pretty useful since you won't even need mjpgstreamer at all in this case. However, IOT devices should always be treated as insecure devices, ESPECIALLY cameras. Lots have known vulnerabilities. Another option is to buy a pi that is ONLY for streaming and use it as your streaming camera server. You need to make sure there is a direct URL for streaming and for still frames if you want to be able to both monitor and take snapshots.
A good middle-of-the-road camera is the Logitech C920. I got mine on-sale for 35$, but they usually run 50$ or so (the MSRP is $99, but I've never seen one cost that much). I've seen some stunning image quality from the Brio (super duper expensive, that's why I've only seen it and don't have one). There are lots of other great cameras out there, and I bet there are entire forums available to compare and contrast the different features.
I hope that helps somewhat. No matter what you do, keep your pi cam. It will come in handy even if you get a new webcam. It might be nice to have more than one camera angle, or a low res stream for some situations and a higher res stream for another.