How to Despawn a block after using "replace_block" in an enchantment post attack effect

So I have this effect that spawns powdered snow under the entity in order to give them the freezing effect after you swing your sword. It works fairly well, however multiple swings can fill up the surrounding space fairly quickly.

I was wondering if it was possible to make it so that this block despawns after a certain amount of time, and if so, how I would go about doing that. Thanks!

Continue to help post