Get a generator extension cord, not a regular one.
Yes, there are extension cords made specifically for generators, and you should probably use one.
The main difference is the wire gauge and the connectors. Generator cords are thicker (usually 10 or 12 AWG) to handle the higher wattage without overheating. They also have twist-lock plugs that won’t pull loose when you’re tripping over them in the dark. Most are weather-resistant and rated for continuous outdoor use.
Regular orange extension cords from the hardware store are not built for this. They’ll work for a small fan or a phone charger, but plug in a space heater or a fridge and you’re risking a fire. Plus, they’ll just pop out of the generator’s outlet if someone bumps into them.
Get a cord with the right plug for your generator (NEMA L14-30 is common) and the length you need. Don’t try to daisy-chain two cheap indoor cords together. Future You on a cold, rainy night will be glad you did.