Upright Freezer won’t come back on once it shuts off
The door switch probably has a problem. That switch not only controls the light, it is also used to turn off the fans and compressor if the door is open. If you banged it and it worked again, there is a wire or connection to it that is loose, or the contacts of the switch have corroded.