Hi, that is clearer.
Go to the time when the stroke is completed – just before 10 seconds? – so that you can see it all.
Select the Shape layer – at the top of your screen you will see the word “Stroke” with a color swatch beside it.
Press on the word “Stroke” and a dropdown will appear – select the third box (Linear Gradient) – click OK.
In your layer the heading “Stroke1” will have changed to Gradient Stroke 1 – select it.
A blue shape, something like . _ _ _ _ _. will appear somewhere on your screen (it can be hard to see or find – zoom out if you need to).
Drag the first dot to the beginning of your stroke and then drag the last dot to the end of your stroke.
The beginning of your stroke should now be white and the end will be black.
Toggle open Gradient Stroke 1, next to the Colors heading press on “Edit Gradient”
A color editing box will appear (make sure the Preview box is ticked). At the top is a bar with a white square underneath at one end and a black square at the other.
Select the white box and then go down and select your red color (the white box will now go red and the gradient go from red to black).
Take your cursor under the bar where the red and black boxes are and left click – a new red box will appear – then move along a bit and left click again – another red box will appear.
With the third red box still selected go down and select your yellow color.
Now drag your yellow box carefully onto the top of the middle red box – you should now have a sharp line between the red and the yellow colours.
Watch your stroke layer (it will update) while you position the middle box and then the yellow box into the right position where the color should change.
Then repeat the process of making two more boxes, changing the color of the second, positioning and dragging them together .
This sounds more complicated than it is in practice.
Let me know if anything is unclear.