The means are the ones used to achieve the goal i.e., the ends.
The ends are the ones to be achieved by a certain way i.e., the means.
These two concepts can sometimes be swapped and disguise the problems from our eye sights. For example, going to university would be the means to learn and research cutting edge field, get a job, or something else. But there is so much pressure from peers or parents, the students started to think to enter the university is the goal.
The same thing could be applied to a job. To earn the money, or embody your desire like you would like to launch impactful service to the society, you enter one of the companies. But while doing job hunting, sometimes it is tough and we might forget what is the original objective. While looking at others going to more high-paid companies, or more challenging to enter a certain company, the gold could be switched to just enter such a company.
The goal and means are up to our perception or interpretation. If we are not really careful, we can easily lose our focus and forget our original purpose due to a lot of noise.
What is your original "ends"? What you are doing is really "means"? Let's check if your means is really one of the means to achieve your "ends."