In Hungary we have this table top game, iiuc this has the same mechanics just with colors. It was (maybe still is) popular in primary school aged 8-12.
https://okosjatek.cdn.shoprenter.hu/custom/okosjatek/image/d...
https://okosjatek.cdn.shoprenter.hu/custom/okosjatek/image/d...
But in Mastermind, you for example aren't told which pins are in correct positions, whereas in Wordle you are told that.
and In November 2004, Michiel de Bondt proved that solving a Mastermind board is an NP-complete problem when played with n pegs per row and two colors, by showing how to represent any one-in-three 3SAT problem in it.