term for panels based on tools or pages
I thought it would be called a contextual menu
Why not simply a "contextual panel"?
A "panel" is certainly a recognised/common term in UI terminology, and a "contextual panel" is simply a "panel" that depends on "context", so it would seem to accurately describe the element in question. I can't think of any other "catch all" term that would have the same meaning.
In my opinion, a "ribbon" is a specific type of panel. "panel" is a more general term.
...but when I enter "meaning of contextual panel" in Google, the definition for contextual menu comes up.
Well, a "contextual menu" could perhaps be conceived as a type of "contextual panel". Or maybe Google is/was just wrong in considering it a synonym, since a "panel" might not have any (menu) options?
FWIW, I no longer seem to get the "context menu" definition in the results. (I assume you were referring to the "Context menu" Wikipedia article - which actually does not mention the word "panel" anywhere in the article.) The SERPs don't seem particularly consistent on this matter. I have seen Microsoft's definition of "Ribbon" returned, but I'm currently seeing many "contextual panels" returned. Also try searching for:
definition of contextual panel
define:contextual panel (
define: used to be(?) a Google search operator)