What are security measures one should know and take before deploying the app, or making secure websites?

I think security is so important,
and would like to know how to make website with security in mind ?