There are several things you can do.
Gabriel Wyner's book Fluent Forever advises using flashcards (e.g. in Anki): on the "front", you put a sentence using the verb form you want to learn but you leave out the verb; the "back" then has the conjugated verb (or the whole sentence), possibly with a note about the verb (e.g. the infinitive and/or the root). In Anki, you can use the "Cloze" card type for this. (Select the verb form and push the "Cloze" button.) The point is that you learn the verb forms through realistic sentences. See also How Do I Best Learn Verb Conjugations? on the website Fluent Forever.
The Spanish Dude recommends what he calls the "conjugation strategy" (as opposed to the flashcard strategy, which he uses for vocabulary). You use a "conjugation worksheet" (you can download a blank conjugation sheet from The Spanish Dude's website). In addition to the conjugation worksheet, you also need to blank sheets of paper and the verb you want to conjugate. You put the verb over one of the 2 by 3 tables on the worksheet and start filling in the forms (for the tense you've chosen) and start filling in the verb forms. If there is a form you don't know, look it up and put a big red X over the table. Then cover the table and start over from memory in the next table.
See his video How to Practice Spanish Verb Conjugations for a slightly more detailed explanation.
Obviously, both methods can be combined.