Get them on the shallow bit of the water and place a fish trap but you have to sit their feeding it however a pack of these are useful but one will die so keep them safe also watch out they do pack a punch
Having a mount that can attack in all directions can save you from a piranha swarm! Highly recommend the Baryonyx for it’s spinning attack. Won’t stun them like larger creatures but if melee is high enough it can 1 shot and harvest them all in one swoop. If that’s hard to find, a Moschops can kill piranhas swimming behind it but it won’t harvest fish for some reason. Useful in caves!