Sequence of 6 shapes which are randomized. How can I correctly link the randomized to the original sequence

Hey, sorry about the question, I have unsure of how to word it properly. I have an issue with linking a base set of 6 shapes to randomized 6 shapes coming out every 3 seconds.
The Base 6 shapes does not change but the new ones coming out in intervals have their shapes changed round. I have a system where you can use the mouse/finger to draw a line between the shapes from the ones coming out. I would like to know how to make it so that when you click on the correct shape in the sequence it allows you to continue and later on increase a score by 1 (Dont need help with this) but if you click on the wrong shape it resets and you lose (or something similar to that)

I hope I have explained alright

In the absence of details of your specific implementation all we can do is make some educated guesses and give some high-level advice. Assuming that the base sequence of shapes and the randomly generated shapes are implemented as game objects, you can do:

Step #1 - give all instances of each individual shape some unique characteristic. It could be the name, the tag, a specific component, or a unique value in a component shared by all shapes.

Step #2 - as you generate the base sequence, put a reference to each shape in an array.

Step #3 - as the user connects shapes, keep track of the number connected. The first shape needs to match the unique characteristic from Step #1 with the shape in the array generated for #2 at index 0. The second at index 1, the sixth at index 5.