The number of frames in your animation has to be equal to this number here:
But reducing the number of frames in your loop will lead to a lot of distortions.
Here some explanations:
What makes looping procedural texture animations in blender a bit complicated, is that we are restricted to linear 4D noise nodes.
We can loop animations by shifting the coordinates around a circle in 2 of those dimensions.
If you now have a 2D texture (that does not loop around an object), say, for the surface of a body of water, you can use 2 of the 4D-noise dimensions for the space dimensions and 2 for the time dimensions, which leads to a looped texture animation without any distortions.
But for a displacement map on an arbitrary object you want 3 space dimensions. So one of those dimensions (at least) will be coupled with the time dimensions. This is a bit hard to visualize (4D), so try to imagine that you want to loop-animate a 2 D texture with only a 3D texture node available. what you can do is create a filled torus in 3 Dimensions, the smaller circle being related to the space dimensions and the larger circle to the time dimensions.
Looping through the time dimensions will make the animation on the outer side of the torus go faster than on the inside.
Furthermore, if you keep the number of frames fixed, the speed of the animation is coupled with the size of the noise.
You can reduce the distortions by making the larger circle of the torus larger compared to the smaller circle (the torus becomes more like a cylinder), so the inside will animate almost as fast as the outside.
However, this will speed up the animation, as cycling through the time dimensions now covers more space.
The only way around this is to increase the number of frames in your animation loop.