Scan it for trouble codes ( of course you'll need to run it a bit to collect some codes
since you already cleared the ones that were there) and load test the battery.
Modern cars need a strong battery for the electrical system to operate properly.
Mine did similar things, then I replaced the battery and everything was cured. Still
does weird things intermittently from time to time. I put the headlights on high for
a couple of seconds and everything is cured again till the next time. I know... I
don't get it either. Maybe its time for a new battery again. But enough about me...
hopefully that gives you some direction. You may need a shop that specializes in
electrical work to go through the car looking for loose or corroded connections.
The good news is that in spite of the annoyance the car is still probably perfectly
driveable until you find the problem. So, other than maybe giving it a new battery,
don't start spending money on parts until you manage to pinpoint the problem.