All of this assumes that:
- The Ubuntu installer detected that Windows was there, or that you immediately stopped after it didn't.
- You selected to install Ubuntu "Alongside Windows" (If it didn't even see Windows it couldn't know how to avoid overwriting its data.)
Seeing just an empty disk when attempting to install a second system on the same disk means the first system will be destroyed if you don't immediately stop at that point.
To fix the Windows boot:
- Revert the AHCI option back to what it was when Windows worked.
- (If they exist, revert Safe Boot and BIOS security options to what they were when Windows worked.)
- Try to boot Windows, if it didn't work:
- Insert a Windows installation media and select "Repair Windows" (This will attempt to make Windows the only thing that boots)
If it still won't boot do step 4 again. Sometimes it needs another go for some reason.
You could try just doing step 4, it could work even if the BIOS settings were different to what they were when Windows worked.
Only after that if you want Ubuntu to work (if you installed it/almost finished installing it):
Boot any Linux boot media and reinstall GRUB without touching the BIOS settings again.
If it didn't work for some reason and Windows won't boot, you can always fix Windows boot again by doing the "Repair Windows" thing once or twice.