Car would not start after driving through deep puddle?

Essentially I was driving around and had to go through a deep puddle. I'd say the puddle was MAYBE about 8-12 inches deep. I drive a 2015 Honda CRV. The car went through the puddle just fine, no issues, and kept driving just fine. The issue was I turned it off, waited overnight, where it got cold (about 10 degrees F) and the card wouldn't start the next day. I did the push to start, and all the lights and accessories would turn on just fine, fans turned on, etc, but engine wouldn't even attempt to turn over. I waited for a few hours, sun came out, opened my engine hood. And let it sit in the sun for a while. I took a hammer and lightly tapped on my starter a couple of times, and she turned over. I know nothing really about about cars, so just curious. What does it sound like may have been the issue? We've been driving for a week now with no issues at all.

Added (1). It was flooding, it rained on top of snow melting from the rain. The puddle when driving through it, created massive splashes on both sides, I drove through them decently fast, to try and displace the water. (If there was any other way out I would have taken it, and this was the better alternative to using a Honda Civic)

Really wild guess, here: Some water got into your starter solenoid, and froze up overnight, which prevented it from engaging the next day. It's probably all gone by now.

Hang on to that hammer, just in case.

You probably didn't HAVE to go through a deep puddle. Risking expensive repairs isn't worth it and doing such a stupid thing can void the powertrain warranty. Since the starter is fairly high up on the ending it wouldn't have been submerged but maybe some condensation froze the bendix gear, which is the part inside the starter that extends to engage the engine flywheel and retracts when the engine starts. That would explain why the hammer trick worked. Now don't be a dumbass and do that again. Find a different route.

If it has been good for a week, why are you even asking? What difference does it make as to what happened?

2015 is car. Year is…2019 or 4 years. Battery is getting weak for the cold weather needs more cranking amps (all batteries have 12 volts… Which is the power to push electricity) Amps is current flow. Like a river or a stream or a trickle. Lights work on a trickle… Starter needs a "rushing" RIVER of current everytime it is used. Especially in the cold. Am guessing battery is the source of your problem. Replace it with new… And be done with it.
. Or hang off a while longer as you are probably good for the summer months as it will not get that cold again. But come next fall plan on Battery replacement for a new one. Battery problems mainly show up in the fall/winter time. Plan for it and put $100 on the side for it for it will happen.
As for the puddle. Have you ever driven down the highway in the pouring rain? That is like one long puddle that is splashing up under the car for the whole time you are driving so the starter gets wet. No big deal. Starter still works. At most you may suffer with water getting into the inside of the car from the deep puddle because IT AIN'T A BOAT.