Generally, you don’t need to. You can simply stop moving your object in the current direction when a collision occurs. This approach is simple and sufficient for most cases.
You can get direction from movement or using raycasts
Another approach might be using Tile Raycast and combining it with DAABBCC:
There is a example of it:
No, they are not. They are overlapping AABB IDs. In your case you are hitting 4 tiles.
More info about what is this lib and not:
There is no collision resolution (e.g., normals) in this library. It is an expensive process, and I am considering implementing it as an optional feature.