AOSP means "Android Open Source Project". You can get the sources of Android, modify them, and build the whole OS. The Android SDK is open source as well.
GrapheneOS is based on Android precisely because Android is open source. They couldn't do that with iOS, or Windows, or any proprietary OS. Same for LineageOS.
Honestly it seems like you don't really know what you are talking about here?
AOSP isn't Android. Nor is the Android SDK.
Also you can totally fork iOS, in binary form, on the dark web, and run it somewhere that isn't an iPhone.