You have to derate conductors installed in ambient temperatures greater than 86F. I would definitely use NM-B 6/2G (or 6/2G MC cable) for a NEMA 14-50R in a garage, just to account for derating since you get to start at 75A for #6 rated for 90C.
The first derating factor is .94 for ambient temps between 87-95F, .94 times 40A is 37.6A if you use the 75C column. I think NM cable is rated for 90C, so if you derate #8 from 55A at .67 to account for a much higher temp of 120-130F, you get 36.85A.
310.15 (B)(1)
Ambient Temperature Correction Factors Based on 30°C (86°F)
For ambient temperatures other than 30°C (86°F), multiply the allowable ampacities specified in the ampacity tables by the appropriate correction factor shown below.