You need a cartridge bearing removal tool - of the right size to match the internal diameter of the two cartridge bearings in that freehub - a small hammer, and a small punch to remove the bearings.
You only need the hammer and punch. Doing it that way can damage the bearing but if it's dead anyhow that's no problem.
And then you need a way of installing new cartridge bearings back into the freehub. The proper way is to use a bearing press, but these are expensive bits of kit. Knocking them in some way with a hammer runs the risk of damaging them.
Using a socket or piece of tubing that bears on the outer race works well. Tap it in with a small hammer. Putting the bearing in the freezer for a half hour first will make it easier.
You want to avoid hammering or putting pressure on the inner race. That puts the force through the balls and the balls may get a small flat spot. That will get worse over time and eventually kill the bearing. This is why driving the bearing out by hammering on the inner race damages the bearing.