In Angular:
Routing guards do not provide security, however this still depends on the way that the full-stack of your application is built, we still need to be careful and not allow the api/application to load authenticated data for unauthenticated users. For example, if you guard a route, let's call it my-account
in this case, by saying that only authenticated users can access this route (let's say this uses a token to authenticate the users requests), then this good practice will mean that only authenticated users can access this route, but if requests do not need to be authenticated, then this is still a huge vulnerability (if you have sensitive data for users, such as account details, etc).
However the most important thing is not protecting the route, it's ensuring that only users with the correct rights can access the data that they are allowed to access. This is because even if an attacker reverse engineers the code to access this route, if they are not authenticated, they cannot access the data.
This likely goes without saying, but do not hard-code sensitive values in your routes! because even if you guard them, they are still accessible to a moderately savvy attacker.
In closing, the key thing is to only allow authenticated users to access data that they are allowed to see, routes are for user experience as mentioned, not for security.
Hope this helps.