I don't think there's any way to KNOW "what's going on". They're pretty primitive creatures.
She might be feeling hungry, depending on the size and frequency of the meals you feed her. And if hungry enough, any heat signature that comes within her range may trigger an attempt to get at it.
Or, for whatever reason, the snake felt vulnerable. It's not an uncommon thing, especially if they are going into shed. Rather than hovering by the glass, try covering it with a blanket and leave her completely alone for a few days until she finishes her shed process, and she'll most likely be right back to her old self.![]()
And welcome to BP.net!
I'm sure she's fine!