When auto batteries are disconnected they may affect the stored memory in the various coumputers that manage the automobile's power, fuel, transmission, etc. So check the owner's manual or Google for your make and model.
The logic in the systems usually have the ability to resync everything automatically, but it may take operating the automobile for a few miles or more so the on-board computers can figure everything out. So, if you just changed the battery and it stalls rather than idle, it's possible that just driving it for 30 minutes will be enough to fix it.