Austenitic stainless steels, such as 304, 316, have very low erosion resistance. They have corrosion and velocity accelerate corrosion resistance, but no hard particle erosion resistance because they are soft so they are a bad choice for pure erosion resistance. I
Hardness for erosion resistance and welding are arch enemies of each other, as typically very hard things are not easily welded due to cracking problems.
Given that, if the weld will be out of the erosion zone and you need some corrosion resistance, you could harden the surface of stainless steel by nitriding, flame spray with a hard coating or weld overlay with hard coating. You could also use a solid bar of something like Stellite 6 which is hard, erosion resistant and can be welded to other parts