From personal experience as an ESTA visitor who got married in Vegas:
My USC fiancée applied for marriage license online. Different states/counties have different wait times. Once applicable, I flew into US, we flew to Vegas, went to county clerk to pick up the paperwork, and got married next day. The officiant mailed back the paperwork, we flew back and started filing up i-130 online. A week later we got an email from county clerk on how to request/pay for a physical marriage cert. Once cert is in hand, we completed/submitted the I-130, enjoyed 2 mths together and then I flew home.
Sooo the short story is there is no “wait time” to marry as long as the paperwork is ready and available. You can marry on a tourist visa, however be truthful when CBP asks you about your nature of visit. Impress on him that you are aware of how immigration works, your intention to marry and depart home to await the I-130 process, also have your return flight details ready (if CBP asks).
If you intend to visit your USC often while waiting the I-130 process, keep the visits short and spaced out. CBP will deny you if they think you are misusing your b1/2 visa to live in US.
Congratulations on the upcoming nuptials and welcome to your CR1 journey!