I installed Home Assistant on Raspberrypi 3B+ from image. This means I have never accessed the Raspberrypi itself. This means I have only been working within Home Assistant. Now I want to install HomeKit in HA and it is recommended that I download an additional package using:
The instructions you are reading are not for hassio, which is a completely different operating system, and does not allow installation from apt.
I suggest you change the category of this post to HASSIO (the All-In-One installer was deprecated months ago) and see if you get any help on how to run homekit there.