>>48539760They do (or did) sometimes. The gen-1 anime had a few gun cameos.
You could say they aren't common because pokemon originates from Japan also its target is children. But realistically I doubt guns would be viable outside of petty crimes.
If there's a psychic Pokemon in the vicinity, they could pull some magneto/neo type stunts; stopping bullets mid-air, taking teleporting and dismantling weapons etc.
Some steel/rock/ground Pokemon wouldn't be notably effected by bullets. Some may be able to manipulate metal (bullets) like they seemingly do to rocks.
The pokemon universe is sci-fi. One can instantly heal various other wounds with a mysterious spray-bottle readily available to children. It's reasonable to assume they have ways of healing damage caused by bullets