How to create a 3d light and shadow effect in 2d

Godot Version

Godot version 4.3

Question

I want to achieve similar results like these

And

But there are literally no tutorials for this. I am a beginner and don’t know how it actually works. I tried chat gpt but nothing helped.

I need a better way to implement it so it works for tilemaps and if I move objects so the shadow can move too. I am trying this for past 4 days but i can’t get it to even work slightly. Please help me with this.:pleading_face:

I really need your help.