Under the treaty of NATO, an attack on one member is considered to be an attack on all and Poland is a member.

https://indianexpress.com/article/explained/poland-missile-russia-ukraine-war-nato-8270794/