Why does the numbers not save when I close and open the widget again?

If by closing it you mean remove from parent, then your numbers won’t save. You can just hide your widget.