Could anyone help me achieve perpendicular lines?

You can check it with a framing square or a rafter square; pick the biggest one that will fit inside.

The gantry looks like it has two Y axis belts, so perhaps one is misplaced by a tooth on its drive gear, as in this larger CO₂ machine:

It’s not obvious to me if that applies to the CoreXY drive on your machine, but something similar may be amiss.