If you look at stats from their careers (thru 2023) including club & country, Messi has 1.18 goal contributions (goals+assists) per game and Pele has 1.35 goal contributions per game. Messi averages .38 assists per game and Pele .42 assists per game. (You can find some slight variations in these stats but it doesn’t really change the story)
I maintain that these are the only two guys you can consider for GOAT. Ronaldo & Maradona don’t come close to their level of production. Pele has the edge in stats and world cups. Messi is the closest we’ve seen to Pele and he’s largely played his whole career in Europe against the best players. I just wish there was more film of Pele’s career.