I'd recommend taking I-15 North to Salt Lake City, then taking I-80 East to Rawlins, then taking US30 & WY-487 to Casper, then I25 North to Sheridan and finally US-14 West to Cody.
@pox installed a level 2 charger in Cody that will help charge up to get back to Sheridan and reverse the route.
Google map of route
Alternatively,
@pox also
installed a level 2 charger in Riverton which would be a shortcut if you go up from Rock Springs via US-191, WY-28, US-26, US20, and WY-120. It's 140 miles for both legs from Rock Springs to Riverton then to Cody so only a shortcut if you can take advantage of 72A or 80A charging in Riverton but it is four hours shorter.
Google map of route