Mechanisms of self-assembly and fibrillization of the prion-like domains