As RimmyD said you will have to think about what you need and how you want to solve it.
There are two basic ways to handle a weapon. Either you spawn a projectile which then flies and has it’s own logic or you simply do a trace which will instantly “hit” the enemy and you can apply some damage or whatever.
The difference between weapons is also completely left to you. It can be purely visual. If you want a real shotgun you need to spawn multiple projectiles each dealing a bit of damage and spraying away in quite a wide spread area (which is mainly a modified rotation when you spawn them). You can control the gravity which affects the projectiles and all that stuff.
For weapons itself you have to think about how it should shoot. The speed, ammunition how fast the reload is (linked to an animation?) should it start to spray once you shot a bit? Should simply the character have a recoil applied but the bullets hit spot on? Are there multiple fire modi? How do you want to communicate with your weapon? Send an interface event from your character / controller? Or should it handle inputs itself?
A very basic weapon is included in the first person example. Besides that it’s really hard to help you with such a wide question. If you have more specific questions I’m sure we can help you. But there really isn’t a specific way to make weapons. It always depends on your use case and what the weapon should accomplish.
Cheers