if you rebuilt it, you should have a clue as to what it might be..
did you gap the rings? Was break-in sucessful? Did you bore the cylinder to fit the (new?) piston with proper clearances?
there's a zillion things it could be but without all the info its just wild guesses.
_after about 10 minutes it will die if I slow down and won’t start again until it cools off_
Hard to start (carb or ignition troubles?) or actually overheated and piston partially seized, stuck in the bore?