How do I make a modular weapon system for vr in UE5?

There are many ways this can be done. One way is create an actoe blueprint for the modular weapon, put in the blade, then switch the blade using the Set Skeletal Mesh node in the modular weapons blueprint. So you wouldnt actually be attaching anything, youd be switching the blade at run time.

Or you could spawn the blade separately and use the attach component to component node to attach it to the modular weapon from your player actor blueprint.

A few notes, you can attach things in blueprint to any joint on a skeleton in the details panle of your skeletal mesh. There is an attach to option. Or you can use scene compinents to act as your attach location/rotation.