This is why I prefer to have x,y of my entities as the center point, and not the top-left point.

If you have two rectangles intersecting, and you know the center point of both of them, and the width and height outward from the center point, you can simply check if x+width of A reaches beyond x-width of B to check if right side of A goes over the left side of B.

You do the same for all the sides: (size being the distance from centre to any side)

Check if x+size of A reaches beyond x-size of B to check if right side of A goes over the left side of B.

if Ax+size > Bx-size: Aright hit Bleft.

Check if x-size of A reaches beyond x+size of B to check if left side of A goes over the right side of B.

if Ax-size > Bx+size: Aleft hit Bright.

Check if y+size of A reaches beyond y-size of B to check if bottom side of A goes over the top side of B.

if Ay+size > By-size: Abottom hit Btop.

Check if y-size of A reaches beyond y+size of B to check if top side of A goes over the bottom side of B.

if Ay-size > By+size: Atop hit Bbottom.

You should try to visualize this using two cubes or rectangular shapes in the real world, e.g. with some cards. There are only four ways for the rectangles to collide, left to right, right to left, top to bottom, bottom to top. (that is if they don’t rotate)