Hello dear user. Inability to focus on a given task is a fairly common problem. In your case it is related to studies. It seems you are having problems with sustained attention and concentration. You can be helped with some medicines namely nootropics with cognitive exercises ( these are available online also).
Next Steps
Consult a clinical psychologist or psychiatrist
Health Tips
Practice makes perfect. Don’t loose hope