Duolingo and spaced repetition flashcards serve different purposes. Flashcards can’t teach you grammar or pronunciation, while Duolingo does a bad job at actually teaching you a large set of vocabulary. Using both of them is probably a good plan, though even better is flashcards + a real class.
Explicitly, by writing explanations of various grammatical phenomena on flashcards. Implicitly, with usage examples that demonstrate how the grammar works.
Flashcards can teach you pronunciation.
Explicitly, by writing explanations of how to produce various sounds on flashcards. Implicitly, with recordings that demonstrate how things are pronounced. (Ok, paper flashcards can't do that, but we're not talking about those, right?)
I got an HSK 1 deck on Anki and it has audio and the pinyin has tone marks so I am learning pronunciation. It is also giving me grammar structures in the first week that Duo didn't in months. I truly feel Anki is better and that Duo is the one that only teaches vocab.
If I need an explanation I just paste it into ChatGPT and ask for a breakdown.