My son has two passports. All entry to the US requires the US passport. All entry to Australia requires the Australian passport. Both passports are known to CBP. Both passports are in the UA records system.
As a general rule he uses the Australian passport for all international travel as the visas are generally cheaper and also in some countries locals prefer Australians to Americans.
Bottom line you can have two passports in the UA record system and you nominate which you are using for the flight.