The Foal of the Dead quest in Hogwarts Legacy is obtained after completing the Plight of the House-Elf side quest. You’ll receive an owl post from Professor Weasley mentioning that Deek wants to train you on breeding beasts. Speak with him in the Room of Requirement and he’ll task you with capturing a male and female Thestral along with purchasing a breeding pen spellcraft.
To catch the Thestrals, travel to the East North Ford Bog northeast of Hogwarts. You can find the den northwest of the Floo Flame. There you can save a male and a female.
For the spellcraft, travel to Tomes and Scrolls in Hogsmeade and buy the breeding pen for 1,000 gold. With both items now in your possession, return to the Room of Requirement and speak with Deek. This will trigger the Swamp Vivarium to appear. Head inside and conjure a breeding pen. Also, make sure to put the pair of Thestrals in the Vivarium. You’ll then need to interact with the pen and pick the two beasts you want to breed. This will give you a 30-minute timer. After the time is up, brush and feed the baby then let Deek know about it to complete the quest.