The hierarchy problem in particle physics might be solved if the origin of mass is explained. If we start with a theory containing dimensionful parameters from the beginning, we have no chance to explain the origin of mass. Therefore, I consider scale invariant extension of the SM. Scale invariance has to be spontaneously (dynamically) broken to generate a mass term, because scale anomaly generates no mass term directly. The spontaneous (dynamically) breaking of scale invariance appears as a cosmological phase transition in the early Universe. If the phase transition is of first order, it can produce a stochastic gravitational wave background, which could be measured in future experiments. In this talk I discuss this matter in some detail.