boot – unable to reinstall macOS on MacBook Pro

In the process of installing Ubuntu 20.04 on my Mac Book Pro (Retina, 15-inch, Mid 2015), I formatted the whole disk and installed Ubuntu 20.04. Now I am unable to install macOS back, previously running latest macOS Big Sur

Things I have tried:

  1. Internet Recovery over WiFi network by holding Command-R not working, showing error with code -2002f. The same happened when I connect it with my mobile hotsport network.
  2. Connected Ethernet cable to run Internet Recovery over wired internet, but the wired network isn’t showing on the networks available to choose for Internet Recovery.
  3. Not showing bootable USB drive on Startup: Created a bootable macOS installer with OS X El Capitan image and made a bootable USB drive using TransMac on a Windows system. But the drive isn’t showing on Startup by holding Option (⌥) after holding immediately after pressing the power button, it is showing only one main drive and not the USB drive!

My findings:

  1. I believe the Ubuntu system isn’t accessing USB drive ports while startup, as both Ethernet cable (which I connect with TP-Link Ethernet Network Adapter to USB) and the bootable USB drive aren’t working
  2. All the ports are working fine, as I can able to access internet over Ethernet as well as the USB drive is also working fine.

Suspicious:

on powering on it shows the following message and then it starts Ubuntu:

Failed to set MokListRT: Invalid Parameter Could not create MokListRT: Invalid Parameter

Importing NOK states has failed: import mok_state) failed

: Invalid Parameter

Continuing boot since secure mode is disabled

can anyone offer a solution? Please