It is a tool by the ruling classes, but alongside a lot of other tools. I don't know Marx view on religion in any deep sense, but I always understood hisvieww as religion emerging as a coping mechanism in some ways, or emerging as a coping mechanism, or just a byproduct of the human experience maybe..?, he does say religion is the heart in a heartless world, etc.
and maybe that's how it becomes a tool, co-opted and utilized for class interests.
Welcome, and enjoy. Be proud.