If you have a very large file....or even not so large, and you do something which challenges your available resources, it might take Inkscape several seconds, or sometimes even several minutes, to complete what you've asked. While Inkscape is working, nothing works. You can't select anything, or click any buttons or menu items. Nothing works until Inkscape finishes what you asked.
If Save or Undo worked, (and the problem is related to resources) I guess it's possible Inkscape coincidentally finished what it was doing just before you clicked Save or Undo.
If you finally figure out what you're doing that is taking a long time, and without thinking, you ask Inkscape to do it, again, unfortunately (despite many requests for such a feature) there's no way to abort it. You just have to wait. Or else be willing to lose everything since your last save, and close the file.
How large are these files? And do you remember the last thing you did before you were unable to select something?
Edit - Here's an article that explains about performance issues, and how you can keep working and avoid a lot of waiting.
https://forum.inkscapecommunity.com/ind ... article=35Or it could be what druban mentioned, an accidentally locked layer.
If this problem is still happening the next time you open the files, and you don't find any locked layers, I would ask if you have a dual or multiple monitor setup?