Chris Dalla Riva analyzed key changes in songs that made the Billboard Hot 100, between 1958 and 2022. Key changes are near non-existent after 2010. The most interesting part is why:
Thus, if you changed the key of “Juicy,” Biggie wouldn’t necessarily have to change how he raps, but if you changed the key of “Over the Rainbow,” Judy Garland would have to sing different pitches. If you picked the wrong key, those pitches might be outside of her vocal range. In short, key doesn’t matter as much in hip-hop.
As hip-hop grew in popularity, the use of computers in recording also exploded too. Whereas the guitar and piano lend themselves to certain keys, the computer is key-agnostic. If I record a song in the key of C major into digital recording software, like Logic or ProTools, and then decide I don’t like that key, I don’t have to play it again in that new key. I can just use my software to shift it into that different key. I’m no longer constrained by my instrument.
See also the increasing similarity of Billboard songs.