Memory is a function of several factors like your mood, mental state, attention, concentration, sleep habits, physical health including any stresses you are dealing with etc. Very rarely it can be due some medical or neurological causes.
Next Steps
To improve your cognitive skills like memory practice good lifestyle choices like yoga, meditation, relaxation, healthy eating and sleep hygiene. Make sure you schedule your activities well. Address any anxiety symptoms using mindfulness techniques. Know your strengths and limitations with regards to your subjects. Spend more time on the subjects you are not so good at. Practice repeatedly. Be mindful about what is working and what is not working. The moment you realize something not working, make some changes in the approach.
Health Tips
If you have any other physical or neurological issues along with memory problems, please consult your Doctor