How do i undo what i did in a terrain

im adding explosions to my game

im planning to make them able to effect the floor if it was a terrain but i dont want it to be permenantly there i want it to be fixed after a while

i thought of making raycast that will get the y axes of that part of the terrain then use fillblock function to filll that gab later but i realized that it will make the map flat if some people had a fight with bombs or something