Updated:

1. Summon a creaking

/summon minecraft:creaking ~ ~ ~3

A creaking from a command is not tied to a creaking heart, so you can hurt and kill it like a normal mob. Creakings that spawn from a heart in a pale garden take no damage until you break that heart, which sits between pale oak logs.

2. Find a pale garden

/locate biome minecraft:pale_garden

Click the coordinates in chat to fill in a teleport command. Pale gardens only generate in chunks created in 1.21.4 or later (locate command).

3. Pale garden items

/give @s minecraft:creaking_heart
/give @s minecraft:resin_clump 64
/give @s minecraft:pale_oak_sapling 16
/give @s minecraft:open_eyeblossom 8

Other IDs: resin_brick, pale_oak_log, pale_moss_block, closed_eyeblossom and creaking_spawn_egg. Resin clumps drop when you hit a creaking tied to a heart; smelt them into resin bricks.

4. Make it night

/time set midnight

Creaking hearts only work at night, when they spawn creakings nearby.

5. A simple horror scene

/effect give @a minecraft:darkness 60 0
/summon minecraft:creaking ~ ~ ~8
/summon minecraft:creaking ~8 ~ ~
/summon minecraft:creaking ~-8 ~ ~

Players cannot watch all of them at once, so something is always creeping closer. For a tougher enemy, see the warden command.

Troubleshooting

Check your command

The Command Error Doctor checks common syntax mistakes in your browser.