Push Notifications Error

Hi, I'm experiencing an issue with my app. I use Firebase as my server, and it is great. Still, there is one issue: when I send push notifications from my app to users, the users will get the notification if the app is open, but not when it is closed. I have tried many solutions to fix it, even asking AI, but the issue is still there. I would be happy to give you access to Firebase and the Xcode workspace, as I have no clue how to fix it.

Push Notifications Error
 
 
Q