Your car can charge at a maximum of 32 amps. As such, I would install a 40 amp circuit breaker on that NEMA 14-50 receptacle (code allows that). Make sure it’s a Hubbell or Bryant brand (there’s a third that I don’t remember the name of) - NOT a Leviton, which are known for melting and arcing.
I would also do the extra work to power it from the main panel, not the sub panel. Your sub panel already appears to be doing most of the heavy lifting - perhaps more than it should be.
That said, if you’re going through the effort of running to the main panel, I’d do a hard wired install on a 60 amp circuit. Future proof and done correctly.