The chemical reactions and pathways resulting in the formation of CD24, a CD marker and cell adhesion molecule that occurs on many B-lineage cells and mature granulocytes, and is involved in B cell activation and differentiation as well as T cell co-stimulation.