All grammarA1
ein and einen
The rule
When a masculine noun is the object (Akkusativ), as after möchten, nehmen or brauchen, ein becomes einen, while eine and ein for neuter nouns stay the same.
der Kaffee: Ich möchte einen Kaffee.
die Suppe: Lotta möchte eine Suppe.
das Wasser: Ich möchte ein Wasser.
Examples
Ich möchte einen Kaffee.
I would like a coffee.
Ich möchte ein Wasser.
I would like a water.
Ich nehme einen Kaffee, bitte.
I'll have a coffee, please.