Flyback diode and MOSFET rating vs DC motor stale current
At turnoff the flyback diode will momentarily carry the same current as your motor is consuming. This current will then reduce quickly depending on the inductance and resistance of the motor.
You will find a rating in the diode data sheets for non repetitive surge current normally about a 10ms rating. The inductive spike at turnoff should not last anywhere near this long so that so as long as the surge rating exceeds your maximum motor current (12A) you will be good to go.
The maximum average current of the diode is unimportant unless you are repeatedly turning off the motor rapidly say for PWM. In this case use the average current the motor is taking.
The IRF520 is not rated at 12A which is the current you will get at startup or if you stall the motor. You should find a mosfet rated at least at 15A.