This paper reviews the low-resilience problem in many cities, poor designs of cities to cope with disasters, and the need for tolerance of urban constructions. It explores answers concerning the question of how shall we build cities resiliently? The method of this applied research is a multiphase process that considers all physical and socioeconomic elements of a city. It introduces six indicator groups of urban management (M), economy (E), built environments (U), Infrastructures (I), natural environments (N), and health protection (H). The groups include 55 indicators as variables in the mathematical calculations in this paper. This paper builds a mathematical model to maximize the profitability of resilient buildings by optimizing investments in the required projects. The projects will upgrade the firmness and tolerance of cities against nature-based and human-made dangers and risks. There is a linear programming in 55 variables to select optimal solutions from fifty-five factorial alternatives. Then, the programming will develop into non-linear programming. The unique innovation of this paper is its linear programming interpretation by non-linear to give optimal solutions for the problem. Applying the Lagrange function in the Kuhn-Tucker conditions proves the accuracy of the hypothesis that post-COVID urbanization requires maximum resilience. Only in this way, the urban economies will be free of risks. Outcomes in this paper will assist in the pre-planning, design, and building of built environments everywhere resilient and sustainable.