Context. This is the second paper of a series on Galactic OB groups that uses astrometric and photometric data from Gaia and spectral classifications from the Galactic O-Star Spectroscopic Survey (GOSSS) and the Library of Libraries of Massive-star high-Resolution spectra (LiLiMaRlin). The previous paper was based on the second Gaia data release (DR2). Since then, the early third Gaia data release (EDR3) has appeared with new astrometry and photometry. Aims. The two aims of this paper are to revise the results for the sample from paper I using Gaia EDR3 data and to expand the sample of analyzed stellar groups to 26, from Villafranca O-001 to Villafranca O-026. Methods. We used GOSSS to select Galactic stellar groups with O stars and an updated version of the method in paper 0 of this series, combining Gaia EDR3 G + G BP + G RP photometry, positions, proper motions, and parallaxes to assign memberships and measure distances. We present 99 spectra from GOSSS and 32 from LiLiMaRlin for stars in the analyzed groups or in their foreground.Results. We derived distances to the 26 stellar groups with unprecedented precision and accuracy, with total (random plus systematic) uncertainties lower than 1% for distances within 1 kpc and of ∼3% around 3 kpc, which are values almost four times better than for Gaia DR2. We provide homogeneous spectral types for 110 stars and correct a number of errors in the literature, especially for objects in Villafranca O-023 (Orion nebula cluster). For each group, we discuss its membership and present possible runaway and walkaway stars. At least two of the studied groups, Villafranca O-O12 S in NGC 2467 and Villafranca O-014 NW in the North America nebula, are orphan clusters in which the most massive stars have been ejected by dynamical interactions, leaving objects with a capped mass function. The existence of such clusters has important consequences for the study of the initial mass function (IMF), the distribution of supernova explosions across the Galaxy, and the population and dynamics of isolated compact objects. We fit pre-main-sequence (PMS) isochrones to the color-magnitude diagrams (CMDs) of four clusters to derive ages of 2.0±0.5 Ma for Villafranca O-026 (σ Orionis cluster), 4±2 Ma for Villafranca O-016 (NGC 2264), 5.0±0.5 Ma for Villafranca O-021 (NGC 2362), and 8±2 Ma for Villafranca O-024 (γ Velorum cluster).