This version of macOS 10.12.6 cannot be installed on this computer
For the release of macOS Sierra, support for various Mac models was dropped. Macs which supported macOS El Capitan 10.11 and not macOS Sierra 10.12 were:


MacBook from 2008 and early 2009
MacBook Air from 2008 and 2009
MacBook Pro from 2007, 2008 and 2009
iMac from 2007, 2008 and early 2009
Mac Mini from 2009
Mac Pro from 2008 and 2009


https://www.cnet.com/how-to/see-which-macs-will-and-wont-work-with-macos/
These Macs do not officially support Sierra and the installer will refuse to install Sierra.
There exists an unofficial patcher which adds support for older Macs to the Sierra installer, with caveats. You can download the patcher from http://dosdude1.com/sierrapatch.html.