How to render only shadow instead of an object?
Eevee
Render Only Shadow instead of Object

In Principle BSDF set Alpha zero
and under Material Properties &gt; Settings &gt; Blend Mode &gt; Alpha Clip


Reaction on your EDIT:
Shadow Catcher

Shader to RGB with some tweaking in Color Ramp
and under Material Properties &gt; Settings &gt; Blend Mode &gt; Alpha Blend