Both 3 verbs involve thinking deeply but they differ slightly in tone, use, and context.
To contemplate:
To look at or think about something thoughtfully, often with a sense of planning or future decision-making. It is used in a rather neutral to thoughtful; sometimes spiritual or reflective tone. It is used when considering a possibility, a future action, with abstract ideas or life decisions.
Ex: she contemplated moving abroad for work /he sat quietly, contemplating the meaning of life.
To ponder:
To think about something carefully, especially before making a decision or reaching a conclusion. Mostly used in a deliberate, intellectual or careful tone. It often involves logic or weighing different options and it can be used in both casual and formal contexts.
Ex: I need time to ponder your offer / she pondered the consequences of her actions.
To ruminate:
To think deeply and repeatedly about something, often something troubling or negative. It is often used in a more negative or obsessive tone, mostly associated with dwelling (incapacity to move on). It is often used when someone cannot stop thinking about a particular issue and it is quite common in psychological contexts (e.g. "ruminating thoughts").
Ex: He ruminated over his past mistakes / Don’t ruminate too much; it won’t change the situation.
I hope that helps.