What is the purpose of the camera, is it for indoors or outdoors, ip camera or analog camera.
But generally whether its indoor or outdoor, analog or ip camera the following below is critical.
Typically cameras have DORI distance .
Detect meaning from the installed location the distance it can detect a human from background scenery.
Observe, distance from which what you can notice what the person is doing.
Recognize, distance from which you can be able to recognize a person.
Identify, distance from which you can positively identify a person without any reasonable doubt.
So a camera 1 in location A will be able to detect and observe from location A but it may not necessarily be able to recognize a person due to wide angle lens such as a 2.8mm or 3.6mm lens.
So if you want to recognize or identify a person then you probably need a second camera with 6mm to 12mm lens. If you use only 1 camera with a 6mm or 12mm lens, it may miss whats happening everywhere else.
Or use a camera 2 at location B with a wide angle lens, now since this is location B, one may not necessarily have a power source for the camera or it is in outdoor which means the camera should be ip68 certified.
Third is the camera going to mounted high or at hand held high level. If a person is going to commit a crime doesn't want to be identified he or she may just turn the camera away or place a cloth on it, like when you use a camera with a bullet form factor.
But if you have a vandol proof camera like a turret or a dome camera, they cannot use the above methods, then can ofcourse smash a camera or spray paint.
But if its mounted high, they can't do much.
Now megapixels do also matter, in a ip camera 2mp means 1080p recording, 8mp means 4k recording. They can record directly to a NVR, NAS. It can send data and power on same cable cat 5e or cat 6 cable.
The same 2mp or 8mp in a analog camera will at best be 640x480 recording, although some newer DVR are able to record at a bit higher resolution.
Analog camera apart from recording in poor resolution also record in poor frame rate.
Analog camers will require a seperate power source and lots of wires if you are using more cameras.
Wifi camers are ip camers but may have poor resolution and frame rate and are heavily compressed. In the security camera world this is the least preferred option.