This is a version of the “TRANSFORMERS ROBOTS IN DISGUISE OPTIMUS PRIME GUN” that has been cut, sliced and scaled (to 96%) so that it fits the Optimus Prime Robots in Disguise fire truck. This is an often lost accessory that was recreated. All credit goes to the original creator, Im just scaling and sizing for ease of printing.
You can secure the top part with an M2 screw or some hot glue if you are feeling lazy.
https://cults3d.com/en/3d-model/game/transformers-robots-in-disguise-optimus-prime-gun-fire-convoy