See my post here for my explanation of how to do simple 2D axis-aligned bounding box collisions. AABB means rectangles represent hitboxes, and the rectangles don’t rotate.
Edit: I should clarify, my post is about responding to collision after detecting it. Detecting AABB collision is as simple as rectangle.Intersects(otherRectangle);