No, it’s not true. The bill which banned TikTok (H.R. 7521 Protecting Americans from Foreign Adversary Controlled Applications Act)[1] was introduced by Mike Gallagher and Raja Krishnamoorthi in 2024, but a near identical bill, the ANTI-SOCIAL CCP Act (H.R.1081)[2] was introduced by those same lawmakers in February of 2023, long before the Gaza War began, though it did not make it out of committee at that time. It’s conceivable that the bill’s passage was prioritized by house leadership due to concerns about content on TikTok, but the text of the bill contains no reference to the Israel-Palestine conflict and its very obvious from public statements by both co-sponsors that the primary motivation for this bill was concern with Chinese influence.
[1] https://docs.house.gov/billsthisweek/20240311/HR%207521%20Up...
[2] https://www.congress.gov/118/bills/hr1081/BILLS-118hr1081ih....