I am trying to restore my mac to factory settings
Says could not create a preboot volume for APFS oinstall
crwdns2934109:0crwdne2934109:0
crwdns2889612:0crwdne2889612:0
0
crwdns2936751:024crwdne2936751:0 0
crwdns2936753:07crwdne2936753:0 0
crwdns2936753:030crwdne2936753:0 0
crwdns2942667:0crwdne2942667:0 12
What is the OS you want to go with? El Capitan OS-X 10.11 is the highest Apple supports on this series
APFS is the newer Apple file system which was first introduced with High Sierra. I don't recommend using it on SATA based systems like yours. I suspect you took this drive from a newer system which is why you are getting this error.
You also need to stick with a SATA II (3.0 Gb/s) drive as this system can't support anything faster.
crwdns2934271:0crwdnd2934271:0 Dan crwdne2934271:0