Doom Eternal, unlike its 2016 predecessor, does not have a pistol. At least, not in the final version of the game. Id Software did create a fully-functioning handgun for Doom Eternal, and it’s actually buried in the game’s files. If you’re on PC, you can even access it and add it to your arsenal.
Here’s how: https://www.ign.com/articles/doom-eternal-has-a-scrapped-pistol-weapon-heres-how-to-use-it