How to achieve size under 5mb for unity webgl build

Because this number in the build report is NOT the actual size, it is the uncompressed size. For the actual and relevant size, check the size of the output folder instead. The compressed size is affected by texture compression settings as well as build compression (Brotli is recommended).

See also these threads: