Key Inclusion Criteria:  Incidence Phase  CGM, TGW, TGM, and GNB who have condomless receptive anal sex with partners assigned male at birth and are at risk for HIV infection. HIV-1 status unknown at screening and no prior HIV-1 testing within the last 3 months  Sexually active with ≥ 1 partner assigned male at birth (condomless receptive anal sex) in the last 12 months and 1 of the following:  Condomless receptive anal sex with ≥ 2 partners in the last 12 weeks Documented history of syphilis, rectal gonorrhea, or rectal chlamydia in the last 24 weeks Self-reported use of stimulants with sex in the last 12 weeks  Randomized Phase  Negative local rapid fourth generation HIV-1 Ab/Ag test confirmed with central HIV-1 testing Estimated glomerular filtration rate (eGFR) ≥ 60 mL/min at screening according to the Cockcroft-Gault formula for creatinine clearance (CLcr)  Key Exclusion Criteria:  Incidence Phase  Prior use of long-acting systemic PrEP (including cabotegravir or islatravir trials) Prior recipient of an HIV vaccine  Randomized Phase  Acute viral hepatitis A, B or C or evidence of chronic hepatitis B or C infection  Note: Other protocol defined Inclusion/Exclusion criteria may apply.