President Joe Biden has encouraged Israeli Prime Minister Benjamin Netanyahu to think carefully and strategically about the risk of escalation as it weighs its response to Iran’s attack.