A useful mental model for thinking about security is a stack of tools, processes, and procedures used to find bugs, with each type deployed at different stages of the development lifecycle.
The lower in the stack a tool or process, typically the cheaper it is to find bugs.