Mastodon is not based on GNU Social in any way other than they both used the OStatus protocol. Before ActivityPub became the norm.
GNU Social is made in PHP and Mastodon is made with Ruby and NodeJS. So two wildly different implementations.
Mastodon also looked more modern and followed more so called modern developing practices. Which is why I think it caught on more than GNU Social ever did.