Start here. This is the direct spoken answer to practice first.
Overview
Angular's template protections are the first layer; production hardening also constrains scripts and unsafe DOM sinks at the browser boundary.
I keep templates static, use normal Angular bindings, avoid bypass APIs and direct DOM writes, and build with AOT for production. I review dependencies and third-party scripts because code running in the page has the user's browser authority. Then I add a restrictive Content Security Policy and enforce Trusted Types where browser support and the application allow it.