Have you tried rebooting the device?
iPad Playgrounds crashing used to be a common concern for me. At that time I was using a 1st gen iPad Pro and it would crash always if I used a // style comment, and crash often if I edited a String literal. (I contacted the devs about this but couldn’t produce some system log to their satisfaction and they couldn’t reproduce so nothing came of it).
Now, about 4 months ago I got a pretty pimmped out iPad and MacBook and iPad Playgrounds has been working great. No crashes… until oh no, it was a couple weeks ago iPad Playgrounds started crashing anytime I entered a ClosedRange like 0…5. OMG! I just spent 2k on this device specifically for iPad Playgrounds and it’s crashing again. Woe is me. Confirmed that in a brand new App project typing…
let i = 0…
…then finishing that with 5 it would crash, always. NOOOOO. Despair. But I rebooted the device and, welp, I can type ClosedRanges again 🤷♀️. It hasn’t crashed again since rebooting🤞
On the MacBook I haven’t really used the 2 different ‘Playgrounds’ available except to see what they are (the ‘Playgrounds’ project type in Xcode and the ‘Playgrounds’ app available on Mac). Neither crashed in the little that I used them.
So I don’t know why it crashes but a reboot seems to help in the one time it started crashing in iPad Playgrounds on my modern device (rebooting doesn’t help on my 1st gen iPad Pro though).