Offer the membership at checkout
Paid Memberships
Guest customers see a product toggle after entering their contact info. When they turn it on, the product is added to their cart. In Subscribfy, it's called Membership Upsell.

What it does
The toggle only appears for guest customers, who are not logged in. The Product ID setting decides which product is offered, so the same block can also add order protection, gift wrapping or another add-on. It is a checkout extension and requires Shopify Plus with Checkout Extensibility.
Turn guests into members at checkout
Set the Product ID to your VIP membership product. A guest who turns the toggle on adds the membership to the order they are about to pay.
A complete membership checkout
Combine it with VIP Perks Display, which lists the perks under the membership line, and Membership Agreement, which asks the customer to accept the terms before paying.
Example · fictional brand
A membership toggle for guests
Ondine Swim adds the Membership Upsell block after the contact section and sets it to its VIP membership product. Guest shoppers see the toggle at checkout and can join in one tap.
How to set it up
In Shopify admin, go to Settings → Checkout → Customize.
Add the Membership Upsell block after the contact section.
In the block settings, set the Product ID to your membership product.