The literal meaning of lillah is ‘for Allah’. Lillah is any form of voluntary charity given for the sake of Allah in any good cause.
The Prophet (Peace be upon him) said, “When a man passes away, his good deeds will also come to an end, except for three: Sadaqah Jariyah (continual charity), (religious) knowledge from which others benefit, or a virtuous child who prays for one (for the deceased)”.Sahih Muslim
Sadaqah Jariya is any form of charity that continues to benefit people in the long-term and the donor continues to gain reward even after death. Lillah can be Sadaqah Jariyah too.