SMD capacitor package size and high frequency performance
Yes, it makes a difference.

A larger package will generally have a higher parasitic inductance, leading to a lower self-resonant frequency and higher impedance at high frequencies:



(image source: electronicdesign.com)

For an 0.1 uF capacitor at 0402 size, the resonant frequency is typically in the 10-20 MHz range.