As other posters have pointed out, you can buy them at many hardware stores. There are also many specialty power equipment stores.
The real issue is not where to buy one, but what to buy. We live on 120 acres in the middle of a wilderness which is 15 miles from the nearest town, in the mountains. So, we are subject to power failures. I bought a DeWalt generator about two years ago and it has worked great. Ours is small enough that we can move it around the property when we want power to operate tools far from the house. This is a relatively small generator so it will not power that many things, but it will work for a portable heater, some temporary lights, and running the refrigerator or a microwave. If you have that you can last through any normal power outage pretty comfortably. Don’t get talked into getting a huge whole house system. They cost thousands of dollars.
When we operate this we just power what we want in the house by an extension cord from the outside. However, make sure you don’t try just plugging into your circuits. That might aactually work for awhile, but when the power comes back on you can get a major short circuit. You can install a special coupling to plug your generator into your house system so you can do that safely, although we have not done that yet.