There are a few reasons why your cactus might be turning yellow. The most common reason is that the plant is getting too much sun. If you think this might be the case, try moving your plant to a shadier spot and see if that helps. Another possibility is that the plant doesn't like its pot for being too small. If the roots are overcrowded, they won't be able to get enough nutrients, and the plant will start to yellow. In this case, you'll need to replant your cactus in a larger pot. Finally, it's possible that the roots are not getting enough air due to bad soil selection. If the soil is too dense, it won't allow enough air to reach the roots, and the plant will start to yellow. To fix this problem, you can either replant your cactus in a different pot with better drainage or improve the drainage of the current pot by adding some perlite or sand to the soil.