In many languages, an adjective simply agrees with the noun in gender and number — nothing more. German is a bit more demanding: an adjective placed directly before a noun (not after a form of "to be") must carry an ending that reflects three things at once — the noun's gender (masculine/feminine/neuter), its case (Nominativ, Akkusativ, Dativ, Genitiv), and its number. This is called Adjektivdeklination, adjective declension, and it's one of the B1 topics that rewards systematic practice over rote memorization.
The key isn't memorizing huge tables — it's grasping one idea: the sentence must clearly "show" gender and case exactly once, either through the article (der/die/das or ein/eine) or through the adjective's own ending if the article is missing or ambiguous. Which set of endings gets used depends on how that job is split between article and adjective.
There are three situations. First: after a clear definite article like der, die, das, or diese, the article has already shown gender and case, so the adjective only needs a weak, neutral ending — either -e or, in most cases, -en; you say der große Mann but den großen Mann. Second: after an indefinite article like ein, kein, or mein — which in the Nominativ masculine and neuter carry no clear ending of their own (ein, not einer or eines) — the adjective has to make up for that missing ending, so you say ein großer Mann (the adjective takes the -er the article should have shown) but eine große Frau (eine is already clear, so the adjective just takes -e). Third: with no article at all, the adjective alone carries the full burden, taking "strong" endings that resemble the definite article's own, as in guter Kaffee or kalten Tee in the Akkusativ.
The most common mistake is treating the German adjective as if it had one fixed ending, used the same way in every sentence regardless of article or case — for example "Ich sehe der große Mann," ignoring the difference between Nominativ and Akkusativ. Remember the golden rule: check the article first. If it clearly shows gender and case, the adjective just takes -e or -en; if it's ambiguous or absent, the adjective itself must carry that information.