How can I install macOS to an internal HD on a different Mac? I have a MacBook Pro and my girlfriend has a MacBook Air. Her's is broken, so I reset her HD, which I did it from Disk Utility.

Can I reinstall macOS to hers from my Mac?

I have an attachment that lets me access the files from the HD on my Mac via USB. Can this be done through Disk Utility?
You don't mention which versions of the Macbook Pro and Macbook Air you have, but, with more recent (last 5 years or so), you can do an over-the-air restore.

Steps:


Shutdown her Macbook Air.
Power up the Macbook Air and immediately press the following key combinations: Command + Option + R. Keep on holding the key combination until you see a spinning globe. You will be asked to connect to your WiFi network so please do so when prompted.
Once you boot into recovery, simply use the Disk Utility to wipe off your main HDD or SSD, go back to the main screen and click on Reinstall macOS on the drive you just wiped. It’s that simple.


This can be a slow process, as it's downloading the OS installer over wifi.

The official Apple support doc.