First I try to modify the code directly of core file.
vendor\magento\module-offline-payments\view\frontend\templates\form\cashondelivery.phtml
I added testing code like this.
<?php $instructions = $block->getInstructions(); ?>
<?php if ($instructions): ?>
<?php echo "MY CUSTOM CODE HERE"; ?>
<?php $methodCode = $block->escapeHtml($block->getMethodCode());?>
<div class="items <?= /* @noEscape */ $methodCode ?> instructions agreement" id="payment_form_<?= /* @noEscape */ $methodCode ?>" style="display: none;">
<?= /* @noEscape */ nl2br($block->escapeHtml($instructions)) ?>
</div>
<?php endif; ?>
Here I have one question.
Where my custom message show? Currently it not showing my message any where on checkout???
Thanks in advance.