Raku, 25 23 22 bytes
thanks ovs for 2 byte improvement
also JoKing for 1 byte improvement
{sum grep $_%%*,1..$_}
declare anonymous block ($_ implicitly declared)
filter (grep) numbers from 1 to $_ inclusive using the whatever variable (*) that are divisible by $_
get the sum of that list