All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad is His slave and Messenger.
You mentioned in your question that you cheated in some high school exams. Cheating in exams or elsewhere is forbidden, based on the hadeeth, "Whoever cheats us is not one of us." [At-Tirmidhi] So, you have to ask forgiveness from Allah the Almighty for what you have fallen into and regret it, and resolve to never return to it.
As for the possibility that you exceeded some people in your ranking due to cheating, then this possibility has no effect, and you do not have to search for them or investigate whether it happened or not, so turn away from thinking about this and sincerely repent as we previously stated.
As for your question if cheating has an effect on your earnings, if you do your work well and perform it as required, and that work is permissible, then the salary you get for this work is permissible, so there is no thing wrong benefiting from it, and it is not affected by what you did of cheating in some exams during your studies, because the salary is given based on your performance and mastering of the work.
Allah knows best.