It’s really tempting to jump back to the beginning of a piece and try again when you make a mistake. Rather, I’d like to suggest that you isolate the section where you are having trouble and repeat that section a few times. Then, back up a little bit and play through and past the spot where you had trouble. How did it go this time? After you’ve backed up bit by bit, try the piece over from the beginning. It should go a little smoother this time and be solidified for the future!