Sonata 2016 stalled while parked

So I've had my 2016 Sonata for 2 years and it's been a great car so far. But yesterday while I sat in a store parking lot with the car in park, out of nowhere it started shaking for about 20 seconds and then stopped. Next it shook again, harder, and stalled. I had the AC and radio on, so my first thought was that it might be a bad battery (?). But I had just gotten it replaced 3 months ago at Valvoline. I drove it to the same location and had them check the battery but it checked out fine. I was able to drive the rest of the day (about 75 miles) without any problems. Thoughts on what else it could be?
0