Which mac model is it?
If it's old, like 2010, 2011 mac, then this might be the thing with Apple discontinuing old macs by not letting their installers work on old models. There's an easy solution, though, that involves using a usb bootable installer and setting back the clock. I had this with a MBP 2010.