Re: Israeli/Hamas war. I think the play here is Russia arming and training Hamas in order to incite Israel and the US to overreact with heavy civilian casualties in Gaza. Then they'll say, 'See? They do it too." And use that as to justify their high civilians casualty count in Ukraine. So, propaganda.
Also, to use up western military supplies there instead of arming Ukraine. And to diminish Isreali military for Iran. The Hamas attack makes no sense otherwise.