I know how much the frame of reference is rotated along the x and y axes and I know the position of the vector in this frame of reference.
If you know how much, then you must know the order. How much is dependent on the order. The problem is, there are several ways to get from one reference frame to another via rotations. You need to look at what you mean above and use the system of transforms that makes the most sense.
TLDR If what you have is azimuth, elevation, and roll from Earth frame to Body frame; then the matrix operations are performed in that order, meaning the matrices are written in the opposite order followed by a column vector and evaluated last first. To go from Body to Earth, the operations are performed in the opposite order, or you use the transpose of the combined direction cosine transformation matrix
Let's say you start by considering a level flight scenario. You have a RHR body frame and a RHR local earth frame. Conventionally, the Earth frame is NED - positive x,y,z is North, East, Down. The body frame is usually FSU - positive x,y,z is Forward, Starboard, Up. But Aft, Starboard, Down; and Forward, Port, Down are also pretty common. Pick one - it doesn't matter as far as the construction of the transform is concerned, the difference is only in the angles that you feed the transform and whether positive pitch is nose up or nose down, positive roll is port side up or port side down, etc.
It is assumed that the earth frame is an inertial frame here. If you need to treat it as a non-inertial frame, things can quickly get tedious.
Since we habitually write x,y,z, that is the order conventionally used to construct the direction cosine transformation matrix from the three square simple rotation matrices based on the Euler angles. The Euler angles are the appropriate angle set for this arrangement of operations. Starting in the Earth frame, Phi is the angle in the xy plane from earth x axis to the projection of xBody axis, yielding x',y',z (this is the azimuth angle). Theta is the angle in the new rotated x',z plane from x' to xBody, yielding xBody, y', z' (this is the elevation angle). Phi is the roll angle about xBody from y' to yBody, yielding xBody, yBody, zBody (this is the roll angle).
Of course, you want to go the opposite way. No problem. The inverse transformation matrix from body frame to earth frame is just the Matrix Transpose of the original matrix.
A very good reference for this is Mark Drela's Flight Vehicle Aerodynamics. It is well worth acquiring, relatively cheap in paperback, and can be viewed online via the EDX website, in the course archives for Flight Vehicle Aerodynamics.