Basic concept is when pulling a car battery to repalce or in my case to change an alternator, you use an ODB2 memory saver to give 12v power to car computer thru the ODB2 diagnostic port. Lots of more expensive devices that do this:
https://ezred.com/product/automotive-memory-saver/
Cheaper...