This is such a common problem it is worth re-visiting even if we have discussed
Your Mac contains some non-volital memory. This memory doesn't lose the values even when you turn ythe computer off. And it controls the behavior of your Mac. It sometimes can get a little messed up, maybe some memory got written to that shouldn't have ot something is just wrong. And it is easy to reset these areas of the computer.
Fix 1/2 in a gap.