So you have booted to Local Recovery mode and are trying to erase the internal device, right?
If you can still boot to the internal disk, prepare a bootable USB macOS installer, then boot to that and use its Disk Utility to erase the whole internal device. I prefer this because then I have a bootable disk available before nuking the internal device.
Or if your old Mac supports Internet Recovery, boot to it via Option-Command-R and use its Disk Utility to erase the whole internal device.
Create a bootable installer for macOS - Apple Support