When you place an adjective directly before a noun in German, it doesn't just agree with the noun's gender — it also changes depending on the noun's grammatical case, whether the noun is the subject (Nominativ) or the direct object (Akkusativ), and on what kind of article comes before it, all at once.
Why does German bother with this? Because German is a heavily inflected language: word order alone doesn't always tell you who is doing what to whom — the endings do. Hearing der schöne Mann tells you Mann is the subject; hearing den schönen Mann tells you it's the object, even if the rest of the sentence gets rearranged.
The good news at this level: you don't need the full table yet (that also covers Dativ and Genitiv, coming later) — just two patterns.
Pattern one, after a definite article (der/die/das): the article itself already signals gender and case clearly, so the adjective only needs a light, weak ending — mostly -e, except -en in the plural and in the masculine Akkusativ, since den is the only definite-article form that actually changes there.
Pattern two, after an indefinite article (ein/eine): masculine ein and neuter ein look identical and give no clue about gender on their own. So the adjective has to carry that information instead, taking a strong ending that mimics the missing signal: ein schöner Mann (the -er echoes der), ein schönes Kind (the -es echoes das).
This is where learners most often stumble: it's tempting to treat ein and eine as one fixed word and forget that the adjective after them must compensate for the article's missing gender marker. A very common mistake is saying ein schöne Mann, wrongly copying the feminine eine ending, instead of the correct ein schöner Mann. Rule of thumb: check whether the article itself already makes the gender obvious — that tells you whether the article or the adjective carries the ending.