How do I set up push notification for my website

Introduction

Any website can send web push notifications after installing Javascript code to enable them. Website visitors have to opt in to receive push notifications before they start receiving them. As part of the opt-in process, the browser displays a built-in prompt. This a browser-based opt-in prompt.
Website can also show a soft-ask opt-in prompt implemented with HTML/CSS/Javascript. This is a strategy for securing an opt-in other than than just showing the browser-based opt-in prompt without any additional context.
Once the visitor indicates to receive notifications through the soft-ask opt-in prompt, then the browser-based opt-in prompt is displayed. The visitor must opt-in the browser-based opt-in prompt to start receiving notifications.

How to implement web push notifications

You need to use a third-party service such as Webpushify.
The implementation steps are:

Author: Webpushify