Looks like you need SUMIF rather than VLOOKUP, i.e. in Master sheet B2 use this formula and copy down
=SUMIF(Data!A$2:A$24,A2,Data!B$2:B$24)