This is what is called a “sample defect”. Occurs on specific examples of all makes and models. Sounds like it occurred on yours, a bit of bad luck. But not the end of the world. Goes with new car ownership is all.
Something like this could be caused by something simple like a defective battery or battery connections or alternator problem. The dealership should have not problem checking the battery and charging system, the likely have an automated machine to do all that. There are some published technical service bulletins (tsbs) about the battery on this car, there may be something unique in the design of that battery, so you might ask if any of those are pertinent to your problem. The only recall I see applies only to California cars, some kind of emissions testing issue. I don’t see anything specific to the dashboard. My first guess, it’s a problem with the battery or charging system, after that a loose connector under the dash, third most likely is a defective dash module, which the dealership would have to replace under warranty.
There’s not a lot you can do to prevent this kind of thing, other than choosing a make/model/year of vehicle that the reliability statistics say is better reliability that most. Did you check with Consumer’s Reports for what they said about the reliability of this car? It seems like Hyundai’s get pretty good reports here, but Kia’s are maybe a little better on the reliability issue. For econoboxes, Toyotas seem to get the best reliability from reports we see here. At least for the long term, 10+ years. After that, probably Honda.