There are three ways to let your visitor subscribe to your store:
1. Browser Prompt
To receive your notifications, your visitors need to allow notifications through the browser prompt. The browser prompt pops up when a visitor first comes to your online store. When the visitor clicks on 'Allow' on the browser prompt, they become your subscriber.
2. Flyout Widget
The flyout widget gives you the option to show your visitors a custom message. Unlike the browser prompt, you can encourage your visitors to subscribe with offers, discounts, and other incentives.
The flyout widget also helps in recapturing visitors who blocked notifications via the browser prompt. This ensures you don’t lose the chance to convert your returning visitors into subscribers.
Read this extensive article about flyout widgets and frequently asked questions about it.
3. Custom Buttons
By designing custom buttons which look native to your theme and brand design, you can make the opt-in experience visually appealing and seamless for your visitors. This can be done by making changes to the theme code from your Shopify dashboard.
Read this guide to add custom buttons to your online store.