Many conditions can result in poor attention.
- Insufficient or poor quality sleep
- Attention deficit disorder
- Depression
- Anxiety
- Even medical conditions such as thyroid & other endocrine disorders, nutritional deficiencies etc.
I would suggest a psychiatrist consultation to evaluate, diagnose and then treat appropriately.