I presume the check engine/lambda light is on? If so, there are codes to be read-
https://www.volvoclub.org.uk/faq/EngineOBDCodes.html
Read the above guide and see which fault codes the system has stored, then reply on here.
My guess is the lambda sensor, but check the codes before buying parts.
Cheers