In short: The sum insured is the maximum amount the insurer will pay under the contract when an insured event happens.
Simply put: The sum insured is the ceiling. If it is lower than the real value of the property, you are underinsured and may not receive the full loss. How this is calculated — up to the sum insured, or with a proportional reduction (the "average" clause) — depends on national law and the contract.
Example: A €100,000 home is insured for €60,000. A €80,000 loss pays €60,000 under a "up to the sum insured" rule. With a proportional clause it pays 80,000 × 60/100 = €48,000.
Watch out: Look for the "underinsurance" or "average" clause in your policy — it can sharply cut the payout.
Example: Bulgaria — If the sum insured is lower than the real value, you receive the full loss but only up to the sum insured; a proportional reduction applies only if the contract expressly provides for it (Insurance Code, Art. 389).
Check in your country — Ask your insurer or insurance supervisor how underinsurance is treated under your national law.
Source: Insurance Code (Bulgaria), Art. 389 (in Bulgarian; FSC edition, not the latest version) — https://www.fsc.bg/wp-content/uploads/2021/files/24426_file.pdf