i know you can use PlayerDeathEvent (if thtas a thing) . But can someone help me with code that places blocks on the grounds when a player dies.
You can use setBlock or sendBlocks, depending on your situation. Without any more details, it's impossible to give a specific example.