مثل is describing the item or gives one of its characteristics; so we can say it is 'same like'
مثال is just an example or equivalent but not the same. مثال also can be used in Arabic as a 'symbol' or 'model' (look into the second sentence)
على سبيل المثال، مثل المؤمن مثل النحلة1
For example, the believer is same like the bee.
2 هارون مثال للشجاعة
Harun is an example for the bravery
wish you a happy year full of learning.
Safy, a professional Arabic teacher on italki.
Update: the answer has been edited based on a comment from sister MG, May Allah reward her with his best, ameen