vanilla spawn protection

so I've made it so that the players can't break blocks in my spawn but they can place blocks in this spawn area, I had the idea of spamming the command clone and make a duplicate of the spawn somewhere but I wondered if there was an easier way to do this.
Continue to help post