It is a good idea to refresh it only when the score changes - it's not a good idea to recreate the entire window.
Creating a window is not a particularly fast operation, and it is wasteful to recreate the entire window when all you need to do is change the contents of the bitmap. For that reason, the code Exhydra suggested is better, since it only refreshes the contents of the window when the score changes; it doesn't dispose the window and recreate it. That said, it would also be fine to not do it in update and manually refresh in every event where the score could change - but only if it is a refresh, not disposal and recreation. However, a simple equality check is very efficient and the cost of running the eval out of the event only when necessary is probably higher than the equality check every frame. Besides, it's less work.
Secondly, when I say "global variable", I am not referring to the in-game variable; it's fine to save the score in an in-game variable. I was saying that it's not a good idea to save the window itself in a global variable, which it sounds like you were doing with $window. Global variables break encapsulation, since they can be modified anywhere and classes or methods which rely on them can thus begin to act in unexpected ways. They are also hard to debug. Most importantly, it is simply not necessary in this case. You would only ever need to create the window in Scene_Map, and it would be better to include it as in instance variable in Scene_Map, as Exhydra does in his or her code.
As for whether it is less memory-intensive, in your situation, to simply make the window invisible when not in the mini-game or to dispose it altogether, then I would be on-board with only creating the window when the mini-game starts and disposing it when the mini-game ends and setting the instance variable back to nil, particularly if the mini-game only occurs rarely. But I am not on board with disposing and recreating it every time the score changes.
Also, if it had been necessary to use a global variable, I would never recommend giving it a generic name like $window.