Im trying to protect input side of inverter from indirect lightning stroke. The maximum voltage of inverter is 380V. The DC side is going to be fully isolated from ground.
Look, I see you are from Slovakia and so won't expect your English to be very good, but why didn't you state that in the first post instead of waste a bunch of time - literally days - waiting for us to play 20 questions with you?
You don't use an overvoltage protection relay to protect against indirect lighting strike; that is what Metal Oxide Varistors (MOVs), Gas Discharge Tubes (GDTs) and Transient Voltage Suppressors (TVS diodes) are for.
Understand that you can only guess what kind of energy or peak power vs. time rating the transient protection will need and, of course, if the "indirect" strike is to the building next door there won't be much you can do about it.