Rigveda and later codified through Manu smriti which codified this Varna and Jati system and made a class of untouchables [1].
This is one of the reason father of Indian constitution gave up Hinduism and became Buddhist. Current Indian govt actively promotes jati and Varna and perpetrate communal divisions to stay in power and people justify those divisions.
[1] https://legaldesire.com/dr-b-r-ambedkar-views-on-abolition-o...
The Wikipedia article is better. But you will notice the article citing the book I mentioned earlier: 'Stephanie Jamison and Joel Brereton state, "there is no evidence in the Rigveda for an elaborate, much-subdivided and overarching caste system", and "the varna system seems to be embryonic in the Rigveda and, both then and later, a social ideal rather than a social reality"'.
If there is really a "large body of evidence", I am still waiting for something concrete that you would cite, so that I can go look it up, in the Vedas.
Which vedic books? Can you provide a source? I have skimmed some vedic books, but never came across such restrictions.
> Only after the conquest of British slowly everyone had access to education.
To the contrary, some historians blame the British for worsening the caste system. See https://www.britishempire.co.uk/article/castesystem.htm for example.