Welcome to the forum!
When debugging code and using formulas like that, I like to build the string for the formula and then check it against the manually build formula. MsgBox() and Debug.Print are tools that can help. The latter places the output into the Immediate window of the Visual Basic Editor (VBE).
Sub XIRR()
' XIRR Macro
' Calculate Internal Rate of Return with dynamic Cells
Dim CF As Range, DAY As Range, s As String
Set CF = Range("B10", Range("B10").End(xlDown))
Set DAY = Range("A10", Range("A10").End(xlDown))
s = "=XIRR(" & CF.Address & "," & DAY.Address & ")"
MsgBox s
Debug.Print s
With Range("E3")
' =XIRR(B10:B36,A10:A36)
.Formula = s
.Style = "Percent"
.NumberFormat = "0.00%"
End With
End Sub