First of all, there's no such thing as a proper author arrangement. There are no laws or regulations about this, and there's even no universally accepted meaning of the author positions, so the authors are arranged as agreed between themselves, and that agreement or understanding is usually reached early on, in the very initial stages of the research to be published. That is, when researchers want to do some research together, they negotiate who does what and who gets which position on the author list. If you are not happy with the proposed position, you are free not to participate in the project at all. In short, the position on the author list is a result of a negotiation, and your leverage in that negotiation is your ability to contribute to the project.
It looks like you did your work without having negotiated your position on the author list. This is pretty usual for MS students, and they don't have good negotiating skills and leverage anyway. You are thus entitled only to be listed as one of the authors, not to be in any specific position on the author list. You get what you negotiate, not what your work is worth. The earlier you learn this the faster you will adapt to this harsh and unfair world.
A few other remarks:
(1) Be happy you are listed at all. The thing is that if you develop some technique and then this technique is used to do some study, you are not necessarily entitled to be listed as a co-author of that study. It's a grey area of ethics and there are no rules about this. Albert Einstein developed the relativity theory, but he isn't listed as a co-author of each and every paper in which that theory is used.
(2) Your co-authors may value your contribution differently and consider your position to be fair. The thing is that MS students are usually heavily reliant on advice, ideas, and mentoring by their supervisors and often do only relatively low-skilled work.
(3) It looks like you were not shown the manuscript before its submission to the journal. If so, it's a research misconduct. When you submit a manuscript to a journal, you have to check the box or declare in some other way that all authors were shown the final version and agreed with its submission to the journal. However, even if you had been shown the manuscript, you could not have done anything about your position on the author list. Your only leverage would have been the ability to say no to submission of the manuscript with your name on it, in which case they could have simply removed you from the author list, see Remark (1) above.
(4) As long as you are not the first author, it doesn't really matter much which position you are in. The thing is that when you apply for academic positions, what people count in your CV is the number of first-authored papers and the number of co-authored papers. I have seen people negotiating the first position, but have never seen people negotiating other positions. People don't bother fighting over such minor things—so neither should you.