How to use two UPS one online and the other as backup?
You want an automatic transfer switch

The device you want is called an automatic transfer switch (ATS for short) and should be readily available through an electrical supply house (or equivalent) in your area.  Note that this device will need to be approved by your local electrical authorities.

A proper ATS not only has electrical protection, but mechanical interlocking of the contacts, making it impossible for the two sources to be inadvertently coupled together.  It also has logic to avoid transferring between sources when they are not phase-synchronized with each other, which can cause serious problems to loads that are expecting a smooth sine wave instead of a sharp "jump", such as AC motors.