Good coffee at home is mostly about a few small habits.
Start with fresh beans
Buy whole beans roasted within the last month and grind just before brewing.
Measure
A simple scale takes the guesswork out: 60 g of coffee per litre is a great place to start.
Taste and adjust
Sour? Grind finer. Bitter? Grind coarser. Change one thing at a time.