If Windows 7 is not detecting automatically the preinstalled OEM key,
then it is not burnt into the BIOS. This is one problem.
If you have made a mistake when writing down the OEM key, this is a second problem.
Try to find the correct key by logic.
Or as this is OEM, you should have a sticker on the computer with
the correct key, so try not to make mistakes when typing it.
Otherwise, if you don't have any of the above, your only hope is to call
HP Support or Microsoft Support.
Be aware that after January 14, 2020, Microsoft will no longer provide
security updates or support for PCs running Windows 7.