When I Play Games, They Freeze!

I think my Makecode has a problem. When I’m playing games, it starts to freeze! Does anyone know if there’s a way to fix it?