Other Postretirement Benefits - Additional Information (Detail) - USD ($) $ in Millions |
12 Months Ended | ||
|---|---|---|---|
Jun. 30, 2023 |
Jun. 30, 2022 |
Jun. 30, 2021 |
|
| Retirement Benefits [Abstract] | |||
| Employer contributions to defined contribution plans | $ 152 | $ 147 | $ 142 |
| Unfunded obligation of plan | $ 50 | $ 48 | |