Cognitive Complexity is a measure of how hard the control flow of a routine is to understand. This can be caused by excessive use of:
for and whileif, catch and caseRoutines with high Cognitive Complexity will be difficult to maintain, as a very non-linear control flow is difficult to follow.
Refactor the method to use less loops, conditionals, or recursion.