This is relatively simple once you have an inventory and slot system and a way to choose between weapons.
I would suggest looking at this playlist by Gorka games or look at one of your chosing. Its a complete rpg tutorial but has episodes on inventory and weapon slots.
You may not want to implement it exactly but hopefully gives you an idea to get where you want to be.
im not sure how many weapons this supports, but by watching how he does things, you can modify change and add to it so it suits your game. So if he has 3 weapon slots for example. See how he creates them and add 2 more.
another example, use google for more specifics you require.
Use these as a starting point and learn. then change and adapt to your needs.
Just using one you find in a tutorial will not help you alone. As it needs to work with your game and logic. But near everything you learn from these can be modified and improved on. Dont just “Copy Paste” someones work as it wont help you or your game, learn adapt integrate, improve!