Iran has backed Hezbollah and Hamas by providing weapons and funds, and after the October 7 attacks by Hamas, fired some ballistic missiles at Israel.
So in that sense, yes, they're linked.
However, that's also not the only factor involved
that is, this isn't just "Israel and Palestine fight, ergo Iran conflict". Iran wants to develop nuclear weapons, which is an issue for the US. There's been historic conflict between Iran and the US on a number of different issues, from the Shah to Iran involving itself in the US conflict in Iraq, providing weapons to the Houthis, etc.
EDIT:
