The definition of Euler angles inherently includes gimbals.
Let’s use Unity’s convention as one arbitrary example (technically they’re a related convention called Tait-Bryan angles, but nobody calls them that).
An Euler angle triplet
(pitch, yaw, roll) means…
Rotate the outermost gimbal, with its axis parallel to the world y axis, by
Rotate the middle gimbal, with its axis perpendicular to the outer gimbal and parallel to the world x axis when
yawis zero, by
Rotate the inner gimbal, with its axis perpendicular to the middle gimbal and parallel to the world z axis when
pitchare both zero, by
The net orientation of the object is then the orientation of this inner gimbal, stacking up the individual rotations of the middle and outer gimbals.
There are other Euler angle / Tait-Bryan angle conventions, but they all share this pattern where an arbitrary orientation is built-up from a sequence of rotations about particular axes. As I explain in this answer, when you compose two rotations in sequence, the angle of one changes the axis of the second – and that makes the chained rotation behave like two linked gimbals.
To emphasize: any rotation scheme that tries to decompose an orientation into multiple angles is inherently modelling a set of linked gimbals. That means it will have situations where it loses a degree of freedom because two of its gimbal axes become parallel – gimbal lock – and you need a correspondingly larger change to your angle triplet to get to a nearby orientation in some direction.
To escape this, you need to leave behind the idea of chaining separate rotations with different axes/angles entirely. Instead we can use…
Angle-axis representations, where we express a particular orientation as a single rotation around one axis by a particular angle. By allowing arbitrary diagonal axes, we can still reach any orientation we choose this way, without composing multiple rotations in sequence.
Quaternions, which are really a special kind of angle-axis representation, dressed up in 4D space with 3 imaginary dimensions. This might seem like a strange choice, but it lets us take advantage of patterns in the multiplication of these imaginary units to compose and interpolate rotations much more easily than other methods.
Matrices, which can express any arbitrary affine transformation, including rotations.
All of these methods let us express an orientation “all at once” rather than as a sequence of rotations with different angles around different axes, so they let us break out of the gimbal paradigm that comes with that sequencing.