Is there a rotation matrix that provides local control at each axis? I'm not entirely sure how to phrase what I'm asking - the best analogy I can give is imagining taking a physical version of the basis vectors, then literally holding and twisting around one axis, then grabbing and twisting around a second axis (sorry for not being well-versed in linear algebra jargon). Almost like I independently twist the axes themselves, but then somehow combine the results (I also don't want it to be a multistep process - just one matrix, if thats even possible).
All rotation matrices I've found only have that kind of local control at 1 axis, and it's just dependent on the order in which the basis rotation matrices are multiplied. I even tried to derive it myself and got rather close to the behavior I want, but I messed it up and can't trace my error (if you want to see what I did, let me know).
Sorry if this isn't a "good" question, I've just spend the entire day confused with rotation matrices and angles, and wanted to see what actually smart people had to say about it.
EDIT: I found what I was looking for in quaternions, sorry y'all!
A good way to have in particular a "fine control" over the axes is to use the exponential formalism.
Precisely, a rotation matrix defined by angle $\theta$ around axis defined by unit vector $\vec{a}=(a_x,a_y,a_z)$ can be expressed in this way :
$$R_{\theta,\vec{a}}=\exp(\theta A)$$
where $A$ is the skew-symmetric matrix
$$A:=\begin{pmatrix}0&-a_z&a_y\\a_z&0&-a_x\\-a_y&a_x&0\end{pmatrix}$$
Of course, you need for your computations to use a software that computes the matrix exponential for you ; Matlab, Python, Mathematica Maple, etc. have a built-in function (matrix) exponential.
This matrix $A$ is often denoted $[a]_{\times}$ because of its connection with cross product $\times$ ; indeed, $[a]_{\times}$ applied to a vector $v$ gives the cross product $a \times v$, as can be seen here :
$$\begin{pmatrix}0&-a_z&a_y\\a_z&0&-a_x\\-a_y&a_x&0\end{pmatrix}\begin{pmatrix}x\\y\\z\end{pmatrix}=\begin{pmatrix}a_yz-a_zy\\a_zx-a_xz\\a_xy-a_yx\end{pmatrix}$$
The fact that cross product is involved in rotation issues shouldn't be a surprise...
By progressive leftwise multiplication (remembering that they do not commute and that all $a_i$ are unit vectors),
$$\cdots R_{\theta_3,\vec{a_3}} \ R_{\theta_2,\vec{a_2} } \ R_{\theta_1,\vec{a_1}}$$
you should be able to "tune" the rotation you desire to achieve.
Here is for example a Matlab code showing the effectiveness of the procedure, knowing that expm and logm are the matrix function exponential and logarithm :