I've had the same issue with my 2020 Chev 2500 High Country. Went to start it via the push button, dash light up like a Christmas Tree then just turned off. After 30 mins, it fired up and the check engine light was on. I immediately took to the dealership and left in a loaner. 5 days later, they told me they had to replace a sensor for the exhaust system.
30 days later, same thing happened. When I took it to the dealer this time, they had "no record" of the sensor they replaced and claimed they just cleared the codes.
Came here hoping to find an answer. To this day, my check engine light comes and goes. Only have 7k miles on my truck but never can time to get it to dealer when it's on. Infuriating to spend that much money on a truck and have to deal with these issues.