Since their initial discovery 20 years ago, very distant (z>2) and massive galaxies that form prodigious number of young stars – so-called dusty star-forming galaxies - represent a serious challenge for the theory of galaxy formation. On the one hand, they are difficult to detect because they reside in dense regions of the distant Universe and contain dusty particles which absorb most of the optical light radiated by young stars. On the other hand, many of these dusty ’Giants’ have been formed when the Universe was very young, sometimes even less than 1 billion years. While the presence of dust allows us to study galaxy interstellar medium, the origin and cosmic evolution of dust in massive galaxies is poorly understood. In this seminar talk I will present results of two large statistical studies that unified observations and state-of-the-art simulations in order to tackle this issue. It will be explained how to apply dust-to-stellar mass ratio as a tool to unveil the complex processes involved in the production of dust, metals and stars in galaxies identified with ALMA. Finally, prospects with forthcoming JWST data will be briefly outlined.