How to perfect align rotation?
You first need to correctly realign the object's orientation.
To realign the object orientation with its face orientation, select a face of your object in Edit mode, create a custom orientation in the Transform Orientations panel:

In the Options panel (top right of 3D view) activate Transform &gt; Affect Only &gt; Origins:

In the header menu click on Object &gt; Transform &gt; Align To Transform Orientation:

Deactivate Only Origins, do an AltR, now your cylinder is aligned with the Global orientation again, it should be easy to align with the other cylinder.