this thread is about excel. You don't need VBA, just use the following formula
Year: =DATEDIF($A3,$B3,"y")
Month:=DATEDIF(EDATE(A3,C3*12),B3,"m")
Day:=DATEDIF(EDATE(A3,(C3*12)+D3),B3,"d")-1
I used the -1 for day as all depends on whether you are calculation the the start of that day, or the end of it.
where column
A=date of birth
B=date 'to'
C=Year
D=Month
E=Day
I don't agree with your manual calculations - how can you get 5 months between 31/07/2021 and 01/03/2022? ditto the other rows
For those using access the formula in a query would be
Years: =DateDiff("yyyy",[DOB],[DateTo])
Months:=DateDiff("m",DateAdd("yyyy",{Year],[DOB]),[DateTo])
Days:=DateTo-(DateAdd("m",[Year*12]+Months, [DOB])-1