Answer:

The convention followed in the order of authors is field specific. In the life sciences, for example, the first author is the author who has done the maximum work and is responsible for the entire manuscript. The last author is usually the group leader or PI who may have given significant intellectual inputs and supervised the work, but might not have actively conducted the experiments or written the manuscript. The last author is also often the corresponding author. However, the order of authors is just a matter of convention in individual fields; there is no written rule about this. In some cases where two or more authors provide a very similar input and perform an equal share of experiments, it should be stated that those authors contributed equally.

You can also read this article for further help: Deciding the order of authors on a paper

Or you can also take this course: Avoid retractions: Publish ethically