But when I execute this two functions in a row, the first one works well and rotates the axis, but the second one resets the first changes (Y axis) but changes X axis as wanted. Do u know if I can do RotationY and RotationX whitout one or the other being reset ?
yes, it does seem like they will reset, as you are setting it a second time. You could combine the two rotations into one matrix (multiply mat1 with mat2), but we could only know for sure if you can share a (non) working playground. This way we can all play with the code and understand the flow.