circulation

I took off my thermostat cover off the other day and caused this to happen and don’t know why.I went for a ride and two miles into the ride I noticed my fan coming on too often then the light came on.I shut it off right away and let the fan cool it down and I got home with only two slashes on the dash.Anyway I got home and touched the radiator and it was cold and my anti freeze was full.I opened the radiator cap slow and left it on and some strage sounds going on and the fluid disappeared and radiator got warm.Obviously it wasn’t circulating and now it’s fine but what would cause this.I only took off the thermostat cover.Was there air trapped in it preventing it to circulate?