Thank you for posting this in Microsoft Q&A.
As I understand the option to grant admin consent is greyed out when you try to add permission for exposed API.
As per the document that you have share it is mentioned that only an administrator or owner of an API's service principal can consent to application permissions exposed by that API.
When you expose an API and register it in App registration, there is a service principal that is created under Enterprise application blade in Entra ID.
You will have to add yourself as owner of service principal that is created for API.
You can follow below article to add yourself as owner of service principal.
https://zcusa.951200.xyz/en-us/entra/identity/enterprise-apps/assign-app-owners?pivots=portal
Let me know if you have any further questions.
Please "Accept the answer" if the information helped you. This will help us and others in the community as well.