By the banks having enough money to give everyone their money back at any moment. It also could have been prevented by the banks having a plan set in place to make sure one person couldn’t clean out all the money in the bank at one time(like we have now), to ensure that there wouldn’t be a wide spread panic.