Don't sweat it, most likely he just didn't have anything once he folds, but you can't know that until he actually folds to the raise. Before that for all we know he could be donk/calling any 6x/4x as well as any pair, or donk/3betting any overpair/set/combo hand.

Just because he folded doesn't mean you played it bad. Just take into account that he donk/folded some weak hand with a weak bet for next time. Chances are if you see him do that again you're better off calling to see if he wants to fire at the turn again or maybe he'll catch some overcard that he'll stack off with. If you see him donk big, then most likely he doesn't plan on folding this time and you can play accordingly depending on what you have.