Technically, suppressors do make gunshots quieter, as a relative statement. Okay, a bunch of things.
The term “silencer” is a misnomer, and one that entertainment media perpetuates. Some firearms can be fitted with suppressors, which will muffle sound it makes when fired. Or, more specifically, it will reduce the sound of the gunpowder igniting, that escapes through the barrel. That’s not the only way a gun makes noise, but it is the main source.
Most suppressors work by providing venting points which allow the gas to “escape” before the end of the barrel, effectively absorbing the sound someplace in that awkward looking barrel extension.
Improvised silencers work on basically the same principle, but with far less finesse, by firing through a medium that will absorb the sound of the gunshot without impairing the ballistics too much.
Suppressing a handgun by slapping a modification on the end of the barrel won’t do anything for the gases that escape when the slide cycles. Meaning, there’s still going to be a lot of noise, but not nearly as much as if you were firing the weapon unsuppressed. (Silenced revolvers do exist, but the entire weapon is built around the suppressor.)
This is also why revolvers can’t usually be suppressed, there’s a large enough gap between the cylinder and the barrel for gas to release, and if you slap a suppressor on it, the gas (and noise) will escape via that route instead of out the barrel.
There are also handguns, like the Makarov PB that can be fired while the slide is locked closed. This feature is specifically to further reduce the noise the gun makes while suppressed. That said, firing from a locked slide means the weapon has to be manually cycled after every shot. And, it’s still not going to be silent, just quieter.
(Also, for aspiring crime novelists out there, please stop using Warsaw pact weapons, those things do not use the same ammunition as NATO weapons. Just because it’s a 9mm pistol doesn’t mean it’s the same 9x19mm Parabellum you can buy in any gun store.)
Beyond this, there’s an additional issue with suppressing a firearm. The speed of sound is ~1116 feet/second, the average muzzle velocity of a handgun is close to that, and high powered rifles are well above it. What this means is, the bullet will create a miniature sonic boom as it passes through the air. This is what causes the distinctive crack of a rifle round at long ranges. You can’t actually hear the powder burning, but you can hear the round breaking the sound barrier.
This requires subsonic ammunition. These rounds sacrifice range and power to keep physics from betraying you. The result is a slower round that doesn’t hit as hard, and doesn’t have the range. When you’re talking about a suppressed handgun, range isn’t a huge issue, but with a rifle, it means that the bullet will be far more affected by drop.
Also, because of the ballistics, subsonic pistol ammo should be closer in power to normal ammo, while subsonic rifle ammo takes much a greater hit to get it’s speed out of the hypersonic range. I say “should” because this is an aspect of ballistics I’m not well versed in.
An interesting note: if you’re asking about snipers, they’re wouldn’t really need a suppressor, at ranges over a couple hundred feet, the gunshot itself won’t be audible, so all they really need is the subsonic rounds.