The SUMIFS function will what you want.
SUMIFS(B1:B10,A1:A10,">="&DATE(2024,10,1),A1:A10,"<="&DATE(2024,10,31))
However, if you plan to change the date range frequently, updating the constants in the formula is cumbersome. I find it easier to put the start and end dates is some otherwise unused cells and reference those cells in the SUMIFS function.