In English, the gerund (-ing) form can be either a noun or an adverb.
Running (noun) is good for your health.
She spends her days dreaming (adverb).
In Spanish, the gerund form can only be used as an adverb. If you want the noun form for -ing, use the infinitive. This means the infinitive (-ar, -er, -ir forms) is used as the subject of another verb as well as after a preposition (por, para, sin, con, de, etc.) whether the translation to English is “to __” or “__ing.”
Correr es bueno para la salud. (noun)
Ella pasa sus días soñando. (adverb)
Me gusta correr. – I like to run.
Me gusta correr. – I like running.
sin correr – without running
después de comer – after eating