Hi, @Boopathi S
Thank you for posting in Microsoft Q&A forum.
You may try to manually remove the related keys from HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\SMS\Operations Management\Components on the affected server after disabling a discovery or removing a role. It's recommended to backup this key prior to making any changes.
For more details:
https://www.reddit.com/r/SCCM/comments/k3hsui/compmonlog_shows_a_lot_of_recurring_errors_should/
https://concurrency.com/blog/sccm-compmon-log-errors/
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Add comment".