An allocation of 48 bytes during the OnTriggerEnter2D comes from Mono, not 2D physics. AFAIK this is the mono "wrapper" to the object being passed back and is only ever allocated once. You get this in all things passed back to the C# managed side the first time they are referenced in the Editor. It's totally automatic and nothing to do with physics as you'd get this for all sorts of other callbacks that pass back an engine object the first time.
In the OnCollisionEnter2D, the allocation of 304 bytes is the Collision2D object which we have to create. You'd also get this (different size) in OnCollisionEnter too for the Collision object. Because it's a class, it needs to be allocated on the heap. This is why there's been the following options (defaults to on) which reuses those objects for both 2D/3D physics:
https://docs.unity3d.com/ScriptReference/Physics2D-reuseCollisionCallbacks.html
https://docs.unity3d.com/ScriptReference/Physics-reuseCollisionCallbacks.html