The Particle Info node works only in Cycles.
In the first screenshot, the viewport shading (Z) is set to Rendered (and the render engine is Cycles)
=> the node works.
But in the 2nd screenshot, the viewport shading is set to Material Preview (which is similar to Eevee)
=> the node does not work.

Viewport shading Rendered (Cycles)
As you can see here the node works in Rendered mode (Cycles) but there is another problem. There is no real randomness. There is only the green area visible.
This is because the scalar Random value (R) is used for the Vector which is a vector (X, Y, Z). Blender will convert like this (1) => (1, 1, 1), (2) => (2, 2, 2) and so on. These vectors are not random, because it's always R=X=Y=Z. You probably want something like (2, 5, 1), (8, 4, 7), etc.
With help of the Object Info node and a 4D White Noise node you can get better random values and make it work in Eevee and Cycles. The random value is used for the W input and this will generate a true random vector (X, Y, Z) where all components are random.

Viewport shading Rendered (Eevee)