Sadaqah Jariyah (ongoing charity) is a kind of waqf (endowment), which is what is mentioned in the hadith of Abu Hurayrah رضي الله عنه, according to which the Messenger of Allah ﷺ said:
“When a man dies, all his good deeds come to an end except three: ongoing charity (Sadaqah Jariyah), beneficial knowledge, or a righteous son who will pray for him.”
Muslim [1631]
Allah’s Messenger ﷺ didn’t specifically make one form of sadaqah jariyah better than the other. Therefore, we should try our utmost to take part in all forms of sadaqah jariyah projects, whether it’s building a Masjid, gifting a Mushaf, constructing a library, or sponsoring a student to learn the knowledge of deen and Duniya (world).