The Imager has some nice options to use. In the Advanced options, activate ssh, set your location and time zone, put in your WiFi credentials if you are connecting the Pi via wireless, and most importantly, set a user ID and password.
~ # help
-sh: help: not found
~ # sudo apt get
-sh: sudo: not found
~ # date
Thu Jan 1 00:02:25 UTC 1970
~ # time
BusyBox v1.16.1 (2011-08-23 13:02:26 PDT) multi-call binary.
Usage: time [OPTIONS] PROG ARGS
~ # sudo apt upgrade
-sh: sudo: not found
~ # apt upgrade
-sh: apt: not found
~ # apt update
-sh: apt: not found
~ #
What is the status of the equipment when you are running these commands?
The SD card is in the Pi, the Pi is powered up and you are either connected to the Pi via a ssh session or via a keyboard and monitor plugged into the Pi?
I don't think we can help you any further installing an OS. You should visit the forums for your hardware and see what OS's run on that device. Then get that OS installed, and once it is installed you can install Pi-hole per our documentation.
I know, thats why I upgraded from Buster to Bullseye like a year or so ago then 2 months ago a pihole update came in and made it where it said the connection to API issue