Its weird coz the abs and check engine light came on at the same time.
Did u drive through standing water at high speed or go through deep water?
If yes then could be just a wet sensor or connection.
Bad alternator and weak battery oso can contribute to warning light but most of the time it will be intermittent.
dont worry too much abt the abs light as u still have normal braking functioning as usual.