Assuming the input data for the second column is in date format, you can use the following formula if you prefer it to a Pivot Table:
=LET(B, INT(B2:B7), C, C2:C7, ux, UNIQUE(B),
m, MAP(ux, LAMBDA(x, SUM((B=x) * C))), VSTACK({"Days","Total"}, HSTACK(ux, m)))
Here is the output.