Consecutive topological phase transitions and colossal magnetoresistance in a magnetic topological semimetal