My opinion, if you are going to drop a NEMA 14-50R line I’d run it with #6 wire. It costs about 30% more than #8. Still protect it with a 40 amp breaker for a 32 amp EVSE.
If in the future you need to repurpose that outlet for something like an RV with 50 amp Service, simply replace the 40 amp breaker and you’re covered. 8/3 vs 6/3 UF cost is about $2.30/ft vs $3.50/ft
I did this with my kitchen range which was listed to connect to a 14-50R with 40 amp service. Later I installed a 50 amp range and I just replaced the breaker.
#6 is not as easy to work with as #8 but once it’s done, it’s done.
Btw, the 14-50R receptacle is the standard for both 40amp and 50amp connections since there’s no 40 amp only receptacle.
The thing that baffles me is that Nissan advertises the new L1/L2 120/240v EVSE that you can connect it to a 240v dryer outlet. Every dryer outlet I’ve seen is 30 amp 240v.