Both dates are in January, so the formula is solved as follows and returns TRUE.

Excel formula: Date is same month and year

Excel formula: Highlight dates in same month and year

Excel MONTH function