It is certainly possible to work a window A/C unit from a generator, but you will need a relatively large generator.

Determine the power requirements of the A/C unit, should be on the data plate or in the instruction book.
You will need a generator of least twice this power.

If the A/C unit uses 1KW which is about the smallest likely size then you need at least a 2KW generator.

If the A/C unit uses 3KW which is about the largest you will get in a window type, then you need at least a 6KW generator, which is about the biggest that is considered to be portable.

Dont forget a battery operated fan as backup, not to be compared with proper air conditioning but better than nothing if the generator or the air conditioner breaks.

If money permits consider a spare generator in case of failure.
A spare A/C unit might be worth considering but is arguably less important.
After a bad storm you should be able to buy an A/C unit if needed, but generators are likely to be sold out.