Say it clearly. Keep it simple.
First identify case/gender/number, then check what the article already signals. Der-type determiners normally lead to weak endings; ein-type words use mixed endings; no article uses strong endings.
Spot the clue
Masculine nominative ein lacks a case/gender ending, so the adjective supplies -er.
Ein guter Tee hilft mir beim Lernen.
Aha! See the common trap
Try thisEin guter Tee hilft mir beim Lernen.
Do not apply weak -e after ein when ein has no masculine nominative ending.
More examples, less guessing
Ein guter Tee hilft mir beim Lernen.A good tea helps me study.