When white light enters the initial surface of a prism, light of different colours deviates through distinct angles towards the prism due to their varied speeds in glass. The dispersion of white light into its constituent colours takes place at the prism’s initial surface.
Only refraction occurs on the prism’s second surface, and various colours deviate through different angles, causing the colours to become further separated during refraction (violet deviates the most and red the least).