There many definitions what is the difference between complex and complicated systems. For code, I'm not using the ambiguous term software, for code I will go with my own definition.
Complicated code is a huge amount of code. The LOC metric is a good indicator of how complicated code is.
Complex code has a huge amount of execution paths. The cyclomatic complexity, or rather the cognitive complexity are a good indicator of how complex the code is. Spagetti Code is complex code. Code complexity is one code quality characteristic.
The metrics listed above are meaningful, easy-to-calculate code metrics. However, it should be noted that it is very easy to create examples where these metrics undoubtedly fail.
Try to avoid complex code. Try to replace complex code with complicated code.
