Help with if nested red formulas in excel. Do the medical period available formula based on conditions?

The formula is:

=IF(DATEDIF(A2,TODAY(), "Y")<10,IF(DATEDIF(B2,TODAY(), "Y")<5,3,6),VLOOKUP(DATEDIF(B2,TODAY(), "Y"),{0,6;5,9. 10,12;15,18;20,24},2))

As shown in the figure: