Alternator is not charging properly or its wire is damaged and due to low voltage abs and check engine lights up.
You can test this by starting the car & once it's start, pull negative terminal off, and you'll see car will instantly turn off. If car doesn't turns off, turn lights on it will again turn off, if it doesn't it means alternator is good.
It's problem related to battery.