food, energy, medical supplies, technology, etc.

I am going to answer this more like emergency preparedness rather than being generally self sufficient. For an entire city to be truly self sufficient requires a majority of the citizens live an unpopular lifestyle, such as that of the Amish.

Food can be stockpiled. Many cities in the U.S. do this with foods that can be stored for prolonged periods of time and will have an emergency storage and meeting point for disasters. This is typically less than a few months of survival food and is by no means optimal for health. Cities can encourage their citizens to stockpile food, providing links to methods for safe canning/freeze drying/other methods of long term food storage. Long term being 6 months to 2 years. Some survival only foods can be stored 20+ years. People can buy pre-made kits online that can last on a shelf for 20 to 25 years. The 20+ year kits are by no means healthy or optimal food. Your city could partner with companies that make these kits of incentivize people stocking up on them.

Water can be stored long term assuming that the disaster does not damage the water tanks or delivery systems and of course assuming you have a vast distributed array of water tanks. Citizens can be taught how to do their own water storage and rain collection, assuming the local government permits this. Survivalists already do this regardless of regulations. Investing in water purification filters and understanding how to plumb everything together is important. Having spare parts stockpiled would be critical. The more that citizens are taught to do, the bigger buffer the city will have on its resources and the less people that will be standing in food lines. Citizens should be encouraged and incentivized to buy water-totes so they can fill up at pump stations should the water delivery system be destroyed.

Medical supplies are tricky. Prescription drugs can only be stockpiled legally by citizens through doubling up or tripling their prescription assuming their physician accepts the liability. This is usually 60 or 90 or 120 days max. People can't just buy and stockpile medical supplies as desired. At least, not legally as far as I know. I would love to be corrected on this one.

Technology is a wide concept. If this means internet, then you would need a percentage of citizens to be HAM radio operators that would provide emergency Wifi access. Your city can form an emergency response team and encourage people to get a HAM license. CB radio is a good fall-back for those without a HAM license, at least for getting status updates. People could also use Starlink assuming it is supported in that area. Starlink is not fully deployed yet. Electricity could be offset if a number of the citizens already had solar+battery+generator power. Some cities also invest in generators and diesel fuel. A few wealthy cities in California can run entirely on generator for weeks if required for example. The more citizens that have their own alternate power, the bigger buffer your city has and less demand required on your backup systems. Your city could partner with companies that provide solar, battery and generator systems to get people discounts / rebates / tax incentives. Even a small portable generator and some fuel tanks can make a big difference. Newer generators are much quieter and more fuel efficient than their predecessors.

Self sufficient in this case will mean having warehouses that stockpile all spare parts your city needs for anything, as it is unlikely that you will have local manufacturing to cover all of your needs. As a thought exercise, you could have a simulation that involves cutting off all roads in and out of your city, cutting all power lines and water pipes. Your city planner may be able to provide a list of resources that are purchased quarterly / annually. Where will your citizens meet up? Civic center, library, school gymnasiums? Will these locations have all the aforementioned resources? Are people at each of these locations part of your emergency response team? Some of these people may be incapacitated, so who are their standby leaders? Have these teams been doing quarterly or bi-annual emergency exercises? Do you have a documented plan and have leaders and citizens printed this plan out and put it in a safe easy to find location, given that websites will not be available? Does your plan have a header in large bold print that says "Expires on ... download AND print this annually"?

If you had the luxury of designing a city from scratch, you could require all home developers to only build carbon-neutral homes and offices so that heating and cooling does not require a lot or any energy. In theory of course. I have never seen a modern first world city built this way. Perhaps 3D printed homes with geothermal heating and cooling will make this more affordable?