You'd have to buy that DLC separately if you get the digital release!
Lego Worlds is coming to Nintendo Switch this fall, and it will be available via both physical retail and digital eShop releases.
Furthermore, the physical retail release will contain not just the base game, but two bonus Premium DLC packs. One of the DLC pack-ins will be the recently announced "Classic Space Pack" which launching for other versions of the game next month, but the second DLC bonus is still unannounced. If you buy the game digitally, the same DLC will need to be purchased separately via the eShop.