You need to write the ellipse in standard form:

(x-h)²/a²+(y-k)²/b²=1, then you compare a with b, the larger one being half the length of the major axis. (h,k) is the centre or origin of the ellipse. If a is greater than b the x axis contains the major axis; otherwise it’s the y axis that contains the major axis.

If the ellipse is not given in this form compare the coefficients of x² and y². If the coefficient of x² is greater than the y² coefficient, then the y-axis contains the major axis; otherwise it’s the x axis. If the coefficients are the same, it’s a circle.

The foci always lie on the major axis.