Usually there's a round of pre-registration and typically sponsors get to steer the course so to speak, so if Mastercard are a title sponsor they'll offer people with a Mastercard first round of pre-registrations then it'll be lower tier sponsors then the general public but that's just pre-registration, actual ticketing is a complete lottery, in 2012 you bid for the tickets you wanted and paid up front then waited for the draw results and got refunded if you weren't successful.
France RWC ticketing for 2023 opened for pre-registrations months ago by the way.