Sculpting artifacts error

I’ve managed to mess up a sculpt to produce this. Is there any ways of fixing it or something to avoid.