If you have a big box store generators they are pure analog, clean sine wave but the RPMs cannot change and the they have hardly any voltage regulation. Another import part is grounding. FRead the instructions for grounding requirements.
The Honda eu2200i is about the best rated generator. I have one but have not had a power failure in six years so it is still in th ebox, however, Hurricane Ian is two days away.
This Honda is an inverter, that is it generates DC voltage and converts it to AC.
https://powerequipment.honda.com/generators/models/eu2200i
Tankless boilers electronic are sensitive to line voltage. A few years ago my brother was having an alarm problem with his Buderus using his whole house Kohler 18 KW generator. Each time the generator fired up and the load switched automatically, the boiler would error out with an alarm and it took a power reset on line power to get it back working. Not good in VT in the middle of winter when it is not lived in full time. Troubleshooting the problem, it was the voltage regulator on the generator that was bad. It was putting out 138 volts instead of 120 volts and the Buderus would shut down on the overvoltage. Replaced the voltage regulator and it fixed the problem.