In the two stages of photosynthesis, light-dependent reactions and light-independent reactions, some pretty cool stuff happens! In the light-dependent reactions, sunlight is absorbed by chlorophyll in the plant's cells, and that energy is used to convert water into oxygen and ATP (a form of energy). Then, in the light-independent reactions, also known as the Calvin cycle, carbon dioxide is converted into glucose using the ATP and other molecules.
As for why cellular respiration and photosynthesis are considered opposite processes, it's because they have opposite effects on energy and molecules. Photosynthesis takes in carbon dioxide and releases oxygen, while cellular respiration takes in oxygen and releases carbon dioxide. Photosynthesis stores energy in the form of glucose, while cellular respiration releases energy by breaking down glucose. So, in a way, they complement each other and help maintain balance in nature