Thanks for sharing Hridey! This is a great experiment to try in the sun 🌞🌈
White light from the Sun is a mixture of colours, each with a different frequency. The glass of water and mirror act like a prism to split (or disperse) white light into a spectrum of colours: red, orange, yellow, green, blue, indigo and violet.
Rainbows appear when raindrops in the air act like a prism, splitting sunlight into different colours.