Nope, they do both! Photosynthesis in the chloroplasts, respiration in the mitochondria. It’s a common misconception that they only photosynthesize.
All living things need to respire in order to survive, from bacteria to fungi to plants to animals. But plants do take in more CO2 through photosynthesis than they release through respiration. So it’s a net CO2 uptake.