Eh, here's something that's not heard everyday:
Merriam-Webster:
1: to go over in the mind repeatedly and often casually or slowly
2: to chew repeatedly for an extended period
// The question got us ruminating on the real value of wealth.
// He ruminated over/about the implications of their decision.
You could say
I sat by the fire and ruminated about Grandma's advice ...
Use it like you'd use "contemplate".
You should know that it is sort of more commonly used for mental health purposes: Healthline
What is rumination?
Has your head ever been filled with one single thought, or a string of thoughts, that just keep repeating… and repeating… and repeating themselves? The process of continuously thinking about the same thoughts, which tend to be sad or dark, is called rumination.
But there are better ways to say what you are trying to say:
- Grandma's advice kept playing in my head, over and over and over again.
- Her words kept running through my mind; I couldn't stop thinking about what she told me ...
- I couldn't stop thinking about Grandma's advice; her words occupied my mind, and ...