I can only give advice for “one note at a time” instruments like the flute or trumpet: practice sight reading children’s songs you know (and therefore can tell if you’ve made a huge mistake) - sight reading, not memorizing! As you get more proficient at reading those, slowly choose harder things - melody lines from a familiar church hymnal are ideal for this. If you make mistakes, finish the phrase, then repeat it, but here, you should be going for quantity, not quality.
Treat this as a separate part of your practice.
I would imagine it’s similar for piano or guitar.