I’ll add my .02 It’s called a skew test. it’s a fairly easy test, but the solution is purely physical. It can be a PITA to take care of, but it’s a one and done kind of thing.
Set up the largest square / rectangle you can do in your machine, and put a dashed line down the middle. I used old wrapping paper. Cut it and then fold it on the dashed line. If the corners come out even, congratulations, your X is perpendicular to your Y. If they don’t, the mis-match is how far out of square you are. You adjust one end of your Y axis drive by that amount, and you are now square.
I was lucky, my skew was 2.8mm. My belt teeth were 2.5mm spacing. I loosened one end and hopped it one tooth. .3mm is less than my kerf, so I’m good.