Some apps won't connect to Internet on Wifi/mobile data; network connectivity problems

It can be difficult to troubleshoot an issue as you report it. Perhaps you could try some of these to see what might have a bearing on your issue.

Does your carrier offer 5G, are you using it. If yes you might experiment with switching it off from Settings > Network and internet > Mobile (carrier) > Preferred network type.

It is difficult to stay in Safe mode for an extended period; but you might try as long as possible. Press Power off button > Long press Power off icon > Select Safe mode.

This might help to identify if some third party app is responsible.

Looking at this possibility, now out of Safe mode, try Swipe down (as if to open notifications etc) and swipe down again. Do you see “Active apps”, any surprises there?

A setting which might help to separate whether mobile or Wi-Fi as the culprit is apparently only available with Developer options on [1]. Settings > System > Developer options > Mobile data always active.

If Wi-Fi is problematic, is it home Wi-Fi or all Wi-Fi (assuming you can test a few Wi-Fi).

Possibly relevant; what settings are you using in Advanced Privacy. Any change when you switch off all or some.

[1] If Developer options are not available; Settings > About Phone > Build Number or Version > Tap seven times on Build number > You will get a message that you are a Developer.

Apologies @dj0, I did not see that you had replied while I was writing!