Team please reply to the question asked
I would think you would have better luck contacting CortexXDR support to find out what their software is doing. It is not a Microsoft product so that is probably the reason that you didn't get much response to your question. There may not be very many users of this forum who use that software AND saw your question.
From a general troubleshooting perspective, I have had good success using the Sysinternals tools, Process Monitor and Process Explorer.
https://learn.microsoft.com/en-us/sysinternals/downloads/process-explorer
https://learn.microsoft.com/en-us/sysinternals/downloads/procmon
If you do an internet search for those tools, you will find sites and videos that describe how to use them.
Briefly, for a looping process, I would use procexp and examine the threads tab to see if I could identify which module was using the most cpu.
For powershell, I would also look at the process command line to see what script it was running. They I would pull up the script in notepad or Powershell_ISE and review the code.
Process monitor will trace all file, registry, and network calls. It can be overwhelming. You can filter on process name and the Tools menu offers summary reports. It can help you understand what a process is doing. Unfortunately, it cannot tell you WHY a process is doing what it's doing.
If you have never used procmon, it might be best if you watched some of the posted videos that provide examples.