The rank achievements are earned by simply collecting gold bricks from multiple worlds. This can be done by completing quests, digging for chests, and chasing troublemakers down. For more on that read this article:
https://www.gameskinny.com/h5pue/lego-worlds-guide-how-to-ea...If you get stuck on a world you can always find a random world and explore it. Here is a video with some more tips on collecting gold bricks:
Credit to The Triple S League.