The Makarov Pistol is abbreviated to "MP" in game for whatever reason. So ensure it's the MP gun your using to do the aimed headshots.
I found the best mobs to headshot were the white Vova engineers. Either freeze or electrocute them so they stand still - then with the Makarov Pistol aim down sight with
and put a few round into their heads to kill them.
Due to Atomic Heart having achievement tracking reset issues it's best to do all 25 in one sitting. The best way to do this is find a save point within a few yards of a Vova engineer. Save, then kill him with aimed headshots. Reload and kill him again. Rinse and repeat 25 times to unlock the achievement.