I have always done this. I used to decorate cakes “back in the day”, and I have one particular straight glass that was reserved for this purpose.
Simply put your piping bag into the glass and fold over the edges. Fill, then lift out and twirl closed. Works like a charm.

Do you put it in bag still hot??
You should wait until your icing is cool enough touch; or you won’t be able to handle the bag. The icing I use is generally made with room temp. ingredients. Let us know if this tip works for you.