If you use either the IDKFA cheat code or the "All cheats" codes before getting this achievement, it may glitch. I recommend not using those codes at all until this unlocks.
There are 9 weapons in Doom Eternal. Two of them--the BFG and Unmakyr--do not have masteries. Of the remaining 7 weapons, the Super Shotgun only has 1 mastery and the rest have 2. This means you have to master 13 weapon mods to unlock this achievement.
To master a weapon, first you must buy its upgrades. This costs 9 Weapon Points per weapon, and if you beat every single encounter, including the surprise encounters, you'll have enough Weapon Points to unlock everything after clearing the second fight in the final level.
In order to master a mod, you have to unlock a weapon through progression, unlock the upgrades for the mod, and then complete a mastery challenge. Some of the mastery challenges are simple and will easily be done through play, such as the ones for the chaingun, while others may prove to be situational and not always register, such as the auto-shotgun.
Fortunately, starting in Mission 10, you will find 7 mastery tokens throughout play. These allow you to unlock mastery in a weapon without grinding through the mastery challenge. Since you could use these for any challenge, it's possible you could waste a token to auto-complete an easy challenge and then waste time grinding on a tedious one. To use a mastery token, select the mod, scroll right, and hold down
Based on my playthrough on Medium difficulty, I found these 7 challenges to be easiest. I recommend you unlock any 6 of these you choose these through normal play:
Heavy Cannon: Micro Missiles
Plasma Rifle: Microwave Beam
Rocket Launcher: Lock-On Burst
Super Shotgun: Improvements
Ballista: Destroyer Blade
Chaingun: Mobile Turret & Energy Shield
I recommend you use mastery tokens to auto-complete these and whichever of the previous challenges you haven't finished yet:
Combat Shotgun: Sticky Bombs & Full Auto
Heavy Cannon: Precision Bolt
Plasma Rifle: Heat Blast
Rocket Launcher: Remote Detonate