Thanks for using the Apple Support Communities.
I understand that you are receiving a message that keeps saying macOS could not be installed on your computer. I'll be happy to help assist you with this.
If you are having an issue with installing macOS, I suggest following the steps in this support article: How to reinstall macOS .
Let me know if you have any questions.
Have an amazing day!