How to make dynamic chatting app with notification features?

hey everyone I am new here. I want to make dynamic chatting app with notification feature, like even if the app is not running in background or the app is not open and if someone sent me the message then I receive the notification of that message.