CdTe and its alloy CdSeTe are widely used in optoelectronic devices, such as radiation detectors and solar cells, due to their superior electrical properties. However, the formation of defects and defect complexes in these materials can significantly affect their performance. As a result, understanding the defect formation and recombination processes in CdTe and CdSeTe alloy is of great importance. In recent years, density functional theory (DFT) calculations have emerged as a powerful tool for investigating the properties of defects in semiconductors. In this paper, we use $\mathrm{DFT}+\mathrm{U}$ calculations to comprehensively study the properties of intrinsic defects as well as extrinsic defects induced by commonly used dopants, such as Cu and group V elements, in CdTe and CdSeTe alloy. This work provides insights into the effects of these defects on the electrical and optical properties of the material.