HaGaon HaRav Moshe Shternbuch spoke about the recent events to his talmidims. He said that:
“Each one should go learn because every little bit of limmud Torah can provide salvation. The danger is very great – not just for them [those on the front line] – but for us as well. The danger is becoming worse and worse and it’s not yet possible to know what will be here.”
Similary, Chabad-teachings teach us that there are several mitzvos we can do. See here:
Help every Jewish man and boy over the age of 13 to put on tefillin today, and every weekday.
Encourage every Jewish woman and girl to light Shabbat candles every Friday before the onset of Shabbat and on the eve of Jewish holidays.
Check your mezuzos
Dedicate a daily prayer for our brethren in Israel. Psalms are especially appropriate for times like this. (Chapter 20)
Have emunah and share it to others
Purchase letters from a Torah scroll
I saw in a post (have no original source) that the Chabad Beis Din of Eretz Yisrael have issued an official call to do mitzvos such as emunah (believing that G-ds eyes are always upon it), reading Tehillim (chapters 20, 22, 69, 122, 150, 81-90).
HaRav Shaul Alter of Ger recently delivered a "divrei chizuk"- words of strength on what one should do know to help the ones in war. He says:
[...] when we are concerned about the welfare of yidden in Eretz Yisroel, we must remember that Torah is our life, and the greatest shmira.
The Medrash says, based on a possuk in Sefer Shoftim, that a talmid
chacham who learns Torah has the zchus to save 40,000 yidden. The Tana
Devei Eliyahu adds a point, that this refers to a talmid chacham who
is mechadesh chiddushim in learning.
The extra effort a talmid chacham invests to delve into the depths of
torah, with ameilus and amkus, this is what saves us from all evil.
Talmidei chachamim here in Lakewood, and all over the world, who
immerse themselves in Torah be’iyyun, have this great zchus, they are
our defensive line.