This one is tricky because as far as I can see they are interchangeable in many cases without following a clear grammatical rule but at the same time they are also certainly not the same word.
If you want to use them anyway, the best explaination I could give you is that "端庄" is most often seen when being used to describe women's facial features and it means they have a decent looking face(not necessarily pretty). For example, "她穿着得体,容貌端庄。"
"庄重" is used to describe either an event where it means "serious" or someone's facial expression in which case it means "respectful and serious". For example, “这是一个庄重的场合。”, “他站在国旗下,神态庄重。”.