How can I make a bubbly foam for coffee?
i assume you are using Blender-Guru's doughnut tutorial.
While there are more than one way to do this, easiest would be for you to re-trace the steps that you took to create particles for the sprinkles. 
if not it could be found here.

https://www.youtube.com/watch?v=jNmnPXY9UQA


Create a single sphere bubble, assign a transparent but a little whitish material.
Select the Coffee mesh &amp; Add a particle system to it: type "Hair".
Select the Bubble sphere as the object instead of the sprinkle as shown in the video.
Weight-Paint mostly around the edge where coffee meets glass on the surface.
Play around with random scale particle setting to get the desired effect.