This question has been answered by BobRay. See the first response.
$modx->setPlaceholder('hyperlink', '<a href="https://www.w3schools.com">Visit W3Schools</a>');
Try this:
$modx->setPlaceholder('hyperlink', '<a href="https://www.w3schools.com">Visit W3Schools</a>');