Salam alykum, I’m familiar with the Hadith that when you drink, your prayers do not count for 40 days. How about indulging in other acts like, gambling, eating haram food, or smoking marijuana? Thanks

Wa alaykum salam. There are some other greater sins that have narrations about them which are like the narration you mentioned about drinking alcohol. For example visiting a fortune teller. A good book to refer to about the greater sins is Greater Sins by the late Ayatollah Dastaghayb Shirazi.

https://www.al-islam.org/greater-sins-volume-1-ayatullah-sayyid-abdul-husayn-dastghaib-shirazi