It automatically replaces the dead drive with a hot spare over a couple of days. You can also do it in a couple of hours with dRAID: https://openzfs.github.io/openzfs-docs/Basic%20Concepts/dRAI...
You just need a couple of parity drives per vdev and one hot spare for the whole array