I am creating my 2D game engine and I need to know if I should first move all objects and then resolve collisions with all objects or I should move and resolve collision one by one objects.
Of the games I have made (2D or 3D) I move and resolve collisions one-by-one. I did not choose this because it was necessarily superior, but that the logic seemed simpler when I initially made it.
If your objects are moving slowly enough, it should not matter. However, if you have objects that can move considerable distances with each step, potentially stepping over another object, then it might be an issue.
I had this issue in one game and I resolved it by modifying my alghorithm to also check for collisions that could have occurred anywhere along the path of movement between steps. This fixed the issue with me, since the faster moving objects were usually processed last. If you are still having trouble, you could do one better and check if a collision could have occurred because two paths of movement crossed.
Thus, either approach was fine from a practical standpoint. In this case I went with the one-by-one processing because it made sense in my particular workflow.