You may need to enable a few options to see bone rotations.
This, in essence, is your issue:
The right solution for it did not seem to be mentioned so let me try and pull that… cant find a video… takes about 5 seconds to do.
https://docs.blender.org/manual/en/latest/animation/armatures/bones/editing/bone_roll.html
Recalculate roll while the chain is selected and the properly aligned bone is the active selection.
Selecting Active Bone as the source.
I remeber it being screenshotted for super-fingers in rigify since it is the most common issue you have with them and the automatic rigging… however it didnt come up as a search result…