New 40A EVSE Wiring Install
If it's cord-and-plug, you need a GFCI breaker...

If you are cord-and-plug connecting your EV charger, then you'll need a 50A GFCI breaker instead of the regular breaker as per 2017 NEC 625.54 (as specified in TIA-70-17-2):


  625.54 Ground-Fault Circuit-Interrupter Protection for Personnel. All single-phase receptacles
  installed for the connection of electric vehicle charging that are rated 150 volts to ground or less, and
  50 amperes or less shall have ground-fault circuit-interrupter protection for personnel. 


...but, leaving the wires nutted off in the box is OK for a hardwired setup

If you intend to hardwire it, though, you can simply terminate the circuit into a junction box with some wire nuts (and a cover if you intend to install it after the final electrical inspection).

As to the rest of the bits...

Getting the cable into the box requires a cable clamp, made of either plastic or metal; this goes into a knockout in the box and holds the cable jacket firmly in place. However, some plastic boxes have integral cable clamps instead of knockouts; with those, you do not need to install a separate clamp.

Attaching the cable to the studs near the endpoints is done using a NM cable staple or strap; these have a somewhat rectangular profile to them to match that of the NM cable itself.  (The clip you depict in your photo looks to be intended for low voltage wiring such as coaxial and communications cables; a NM cable will simply be too big to fit into it.)