VFR to IFR in a flash on a solo cross-country

I can no longer recall if I was aware of an incoming system and thought I could beat it, or it developed quicker than forecast and “caught me” or what. But in a flash, I went from VFR to IFR as if someone had flicked a switch. My first reaction was to see if I would “pop-out” the back, like all of us did/would/still do. But after about 15-20 seconds, my thoughts turned to bugging out.