you do not want to hammer on the bearing itself as you will damage it . take a socket tht fits over the bearing race and hammer on that
did you clean out the crank opening and make sure it was free of any rust, ridges or dirt
Did you put some light grease on the outside of the bearing
Is the bearing in straight
is it the right bearing
stock or aftermarket crank- some cranks have a lip and some aftermarket cranks are not drilled as deep.
You want the bearing flush with the end of the crank