Your store can be configured to require shoppers to open an account before making a purchase. The default setting allows guests to make purchases, with an option to register for an account after they complete the checkout process.
Checkout method - Check out as guest
Disable guest checkout
On the Admin sidebar, go to Stores > Settings > Configuration.
On the left panel, expand Sales and choose Checkout.
Expand the Checkout Options section.
If the setting is for a specific store view, choose the store view where the configuration applies.
When prompted, click OK to continue.
Set Allow Guest Checkout to
If necessary, clear the Use system value checkbox to enable changes to this setting.
Click Save Config.