How do military operations like Operation Sindoor balance the need for security with the risk of escalation?

This question explores the challenges faced by governments in conducting targeted military actions against terror sites while ensuring that such actions do not lead to broader conflicts or diplomatic fallout.