if I bleed for 2 days of my haiz and then for the 3rd nd 4rth day it stops, no spotting no bleeding nothing but after that I again see some spotting and bleeding. On which day should I take the ghusl. When should I consider purity from haiz and start praying and fasting?

The minimum number of days for hayz is 3 days and it must have continuity for all 3 days. Since you saw blood for less than 3 days, that blood is istihadha and depending on the conditions of the blood, different rules would apply. The second bleeding which started, if it has continuity and lasts for 3 days minimum, it is hayz otherwise istihadha