Welcome to the HP Support Community. I'd be happy to assist you.
I understand you are trying to enroll the printer in Instant Ink and the printer is not printing the claim code.
Kindly refer to this document to know how to enroll the printer in Instant Ink.
If the printer is not printing the claim code, you can still get the printer claim code by pressing the HP ePrint icon on the control panel display and selecting Set Up or Yes to enable Web Services. Your printer attempts to print a page. If Web Services are already enabled on your printer, you see a Web Services Summary screen after pressing the HP ePrint icon. If enabled, press Print or Print Info to print the Printer Info Page. Even though you cannot print the page, the action of enabling Web Services or pressing Print or Print Info activates your claim code. Find your HP ePrint email address on the control panel display. Press the ePrint icon again if the Web Services Summary screen goes away. The first part of the HP ePrint address preceding "@hpeprint.com" is your claim code. For example, if your HP ePrint email is "firstname.lastname@example.org", then "abc" is your claim code.
I hope this helps! Keep me posted.
Please click “Accept as Solution” if you feel my post solved your issue, it will help others find the solution.
Click the “Kudos, Thumbs Up" on the bottom right to say “Thanks” for helping!