Basically, I was a student at University Y when I wrote a paper. I am no longer a student there, but work at Company Z.
Do I still list University Y as my institutional affiliation? Their resources helped make the paper possible and all of it was written at University Y.
But on the other hand, I am currently working at Company Z.