Yes, that happened to me many times before during my years as a student. Sometimes people get very nervous before and during a test and as a result their brain freezes and temporarily (albeit unintentionally) forgets what it already knows, which is/could be right there in front of them on the test itself. Some people have short-term or long-term memory loss, which affects them and their test performance. Some people never write things down and as a result, their brain gets overwhelmed with trying to remember everything. Or, they rely on their phone to "remember" everything for them and as a result they don't give as much effort as they should to mentally retain important information of all kinds.
There are many different strategies to study for tests effectively and comfortably that suit different people's learning styles and strengths. Find the one that works best for you based on what you know and are continually learning about yourself throughout time. Good luck to you on all of your upcoming tests! :)