Each journal has its own format and to get your paper published by a journal you must write according to its format. To do so, visit website of the journal and look for a page called “instructions to authors”. It may also have other names such as “for authors”, “information for authors”, etc. It is important to go through this page and format your paper according the guidelines of the journal. There is useful information on this page such as the maximum word count or length of your summary, length of your paper, citation style, maximum number of references, maximum number of figures and tables, required sections in a paper, etc.
It is also a good idea to download some papers, about 10, from the journal to which you intend to submit your paper. (Which journal should I choose for my paper?) You do not need to read those paper but by looking at those papers you get a rough idea of the required format. For instance, if the journal does not say anything about the minimum number of the required figures in their instructions and you can get an idea what is the average number of the figures in the papers published by the journal. Perhaps you do not want to submit a paper with 2 or 3 figures while the paper in the journal have at least 5 figures. You can also find out what is the average length of each figure legend. (What is a mega journal?)
By comparing your paper to the published papers of the journal, try to stick to the average. Sometimes journals ignore it if the paper goes beyond certain limits. But you cannot go beyond your limits in every section such that your paper is out of proportion.