Macbook logs me out when active on it
Hello, I have a Macbook Air (13 inch, 2017) which randomly logs me out and takes me back to the logging screen whilst active on it. Sometimes after entering the password when being logged out, it will do it again and again, even when I am still using it. This has been happening for several months, and I cannot find anyone who has a similar problem or solution. If anyone has any ideas on how to stop this I would be grateful.
MacBook Air 13″, macOS 10.15