DocsFix a problem
My colour came out flat
You wired something varying into a Color Ramp and got one colour across the whole shape. The gradient is set up correctly and the ramp is doing what it was given: the number reaching it is the same everywhere.
Something in the chain returned a single number
Most sources hand back one number per point. Height, noise, distance and a comparison all do.
Map Range does not. It returns a single value, so a chain that goes height, into Map Range, into a ramp arrives as one number and paints everything identically. Take it out and the gradient appears.
If a colour that should vary comes out flat, walk back along the wire and ask of each node whether it gives one number or one per point.
Something repainted it afterwards
Set Material replaces the colour of everything below it, including a ramp's work and including every branch that went into a Join.
If a later material is flattening an earlier one, the app says so and names both ends, because "this colour does nothing" is not much help without knowing what is doing it.
Paint each branch before joining, and put a plain material above a ramp only when you mean to lose the ramp.
The wire connected but the value did not
Only some inputs read a different value per point. Wiring a varying value into an ordinary setting is refused rather than accepted quietly, so if a connection would not make, that is why: use the input meant for it.
It varies, but only in bands
That is face colouring rather than corner colouring, and it is often what you want for a low-poly look.
If the bands look like triangles instead of tiles, the shape's faces need declaring, and declaring again after anything that changed its topology.