How do I keep rotations from flipping?

I have a script that rotates an object around its X axis by a small increment every update.

But when the X rotation value reaches 90 degrees, suddenly the Y and Z rotation values flip 180 degrees.

How do I prevent this from happening, and what is causing it?

Should I be using Quaternion functions instead of transform.RotateAround ?

for a more detailed explanation of my issue, see here:

Unity already uses quaternion and that is the reason of your flip. The values you see in the inspector are just conversion from the Quaternion, if you want to see the real rotation of your object, click the top right icon in the Inspector and choose Debug. You will see some hardly understandable values.

The reason of this jump is to avoid gimble lock as without this, your rotation axis would align and lock themselves together.