Speaking from my own experience as a kid in the eighties, my parents allowed me to have toy guns and play "war," "Special Forces," and "hunt the enemy" to my heart's content whenever I felt the need to get together with friends or my cousins and do so....act out the whole "boy with toys" thing.
They countered the plastic rat-a-tat-tat plastic Uzis, M-16s and pistols they allowed me to have with constructive learning toys, books, art supplies and video games (Atari, Colecovision, the earliest Nintendo system) so as to encourage (mostly) peaceful creativity, thinking and problem solving skills. Yes I pointed my trusty plastic Uzi that made the loud rat-a-tat-tat when you pulled the trigger at my cousins and shouted "gotcha! Fall down, I nailed you!" But when that was done I came inside and drew. Sketched. Wrote short stories. Read books. Comic books. Learned history and geography. Played video games (the most violent of which in 1985 wasn't even as raunchy or bloody as two seconds in one of the Grand Theft Auto
franchise). Watched PBS. Studied insects.
The point: my parents knew real guns were not to be trifled with and I was taught that "you don't point a gun at someone unless you really mean it" and most violence in the real world was brutal and pointless, but they taught me context and counterbalanced the rough-and-tumble war and shooting toys and games of the '80s with things that were creative and intellectual in nature.
I think that's always been the problem with many parents whether they mean well and just don't know how to handle their kids or are just damned lousy moms and dads who have no real business having offspring: correct context and balancing their children's roughhousing and play violence with things that are more constructive and creative. Let them be kids and be prepubescent and pubescent males, but temper the rambunctiousness and shoot-'em-up with pursuits that allow them to express their own individual talents.
You can't really stop most little boys from being little boys, but you can
show them that there's a whole lot more in this world than guns and violence.