In fact, I was using only one RAM stick in my PC, not two. And I did what you suggested, but nothing changed. But perhaps my issue has been resolved now. After posting here, I searched online repeatedly for information about this issue and found some articles, such as this one.
The problem was in the BIOS. I updated it to the latest version and the problem was resolved. 🙂