Flickering headlights and dash lights

the flickering stopped after 10 mins and hasnt come back. is this an alternator problem or loose battery cables/ground strap?

I would check the battery cable connections, including grounds, and the connections at the alternator.

Then I’d go to a parts store and have them test the alternator and the battery.