The first method is to spend some money to buy an axle puller, which is easy to use and won't hurt the bearing.
The second method is to use a vise, but pay attention to several layers of paper to prevent the vise from damaging the bearing, and you can't pull it out casually. You should pull it out of the edge bit by bit with a vise.