It's absolutely possible for the power to be out that long, so it's a great idea to have a plan in advance.
It's good to always have extra supplies in general. I remember the toilet paper flying off the shelves when COVID hit, and the "hot item" might change depending on the circumstances. So it's a good idea to always have an extra supply of toilet paper, shelf stable/canned foods, bottled water (a water purifier isn't a bad idea either), batteries, etc.
A good tip is to buy just a little extra (within your budget) each time you shop. Eventually, you'll build up a sufficient stock and can buy only the needed amount of things again. To maintain the extra supplies, use them and replace them with new stuff. The goal here isn't to have a bunch of 10-year-old cans - it's to have the same stuff you're always using, but with enough extra to last a couple of weeks.
Try to stock up on extra medications. I fill my prescriptions as early as they'll let me and set a little aside every month until I have enough for two extra weeks.
It's good to have physical cash prepared in case stores are unable to scan cards. Judging by the price of groceries these days, you'll want to save up a decent amount of cash ahead of time - whatever is appropriate to your area and circumstances.
Depending on where you live, you might want to have warm clothes that you might not usually need. The southern United States really struggled when a cold snap burst pipes and power lines. They didn't have access to warm clothes because they don't generally need any. Don't underestimate the cold. When I say warm clothes, I mean hats, scarves, mittens, socks and a good winter coat. Maybe boots, too. Extra blankets are also great to have. Climate change is real, and the weather might surprise you. If you live in an area that already experiences a cold winter, you are hopefully already prepared for this.
Make sure to have candles (and a way to light them) and flashlights. Regularly check your flashlights to make sure they work and the batteries aren't corroding.
Gas cooking tools are a great thing to have. You can do a lot with a grill - even baking! Even portable camping stoves are better than nothing. Make sure to use them safely. It's a danger to use most of those inside.
It's also good to keep your car's gas tank at least half full (if you have one). Gas stations can get overwhelmed with panicked people and cause problems.
Portable battery chargers can make sure your phone has enough battery. Make sure the battery is charged in advance. Keep your phone in power saving mode during the outage. It's best to try to keep devices charged in advance, but heaven knows I've been caught with my phone at <30%.
Items that can recharge things using motion (like shaking or turning a hand crank) can be very useful. You usually see this design with flashlights, but I believe there are versions that can also charge other things. Make sure you have plugs that work between your device and the charging device.
Have emergency contacts written down. What if your phone dies and you have to borrow someone else's? Do you know the numbers of your friends and family? And do they know your most recent phone number and address? If they're worried and trying to check up on you, it wouldn't do well for them to be going to an old address or dialing a wrong number.
Generators are great, but they're also expensive. I recommend getting one if you can, especially if you live in an area with natural disasters like earthquakes, hurricanes, tornados, or anything else that makes a power outage more likely. It's REALLY nice to have something strong enough to keep the freezer working. But, again, they are expensive, large to store, possibly likely to get stolen, and they must be maintained and used properly. Never use one inside the house unless it's advertised to be safe being used that way. Keep the generator outside where there's ventilation, and use a long extension cord to power whatever you need inside. Prioritize what you plug in, because generators can only produce a certain amount of energy at a time. Sure, there are ones that can power a whole house, but that's super expensive. Learn in advance how much power your fridge and other things need and how much energy the generator can produce, and plan accordingly. Make sure you power on the generator occasionally to make sure it still works and doesn't need any fuel or maintenance.
Perhaps most importantly, make sure you know where all of these items are! If it's dark, it's going to be hard to go searching for flashlights, candles, or matches. Check everything twice a year to make sure nothing has gone bad and everything still works.
I know you asked about power outages, but having a go-bag prepared might be a good idea to look into. You never know when you might need to quickly evacuate. It's good to have a supply of food, clothes, cash, and copies of important documents already packed.
The comments on this post have additional suggestions as well.