Creating Google Analytics 4 Event

Hi there!

I am trying to create a custom event in Google Analytics 4 when someone allow for notifications. I saw the documentation but the implementation was for the Universal Analytics which is going to stop collecting data after 2023.

Is there any way to add this to GA4?