Does battery affect how engine runs

Was the old battery dead? Did you check to make sure the alternator is working fine? If the charging system doesn’t supply enough electricity, the car will stumble and die. I’d get the alternator checked at a parts place (they’ll do it for free) just to make sure you aren’t about to have problems with your new battery from under charging.