I want to limit the rotation of a physical object on two axes so that it rotates only on the X axis. However, Rigid Body Constraint has no effect. How can I fix this?
You should explain in detail what you want to achieve. For the moment maybe you've mistaken what is Rigid Body Constraint, it is supposed to create a hinge between 2 objects that have Rigid Body themselves (see below), which doesn't seem to be what you want.
I don't think that you can constraint the rotation axis of a rigid body falling (Limit Rotation constraint doesn't seem to constrain an active rigid body either), except with some tricks like for example a double wall (Rigid Body > Passive):
A quick explanation of Rigid Body Constraint: Create 3 objects, here the top object is a Rigid Body passive with the Animated option activated, the bottom object is a Rigid Body active. The empty (it could be a mesh object as well) is the object with the Rigid Body Constraint, Type > Hinge, rotate it 90° on Y so that its local Z axis will be the axis of rotation, choose top object as first object and bottom object as second object (note that you could only use 2 objects, the empty here could have the constraint and you choose it as first object):
Since you haven't provided any details of exactly what you're trying to do, I'm going to give the simplest possible answer!
Click the padlock icons against the Y and Z Rotation settings on the Transform panel. Your object will now only be allowed to rotate in the X direction.
Now you've supplied your file, this is your file with those settings applied: