Publishing two papers on the same or a very similar topic can be considered unethical unless the two studies are completely different in content and focus. If the two papers have very similar or overalapping content, they might be considered duplicate submission or salami slicing.
Duplicate submission refers to the practice of submitting two very similar papers to two journals and trying to publish them as two papers when one paper is sufficient. Salami slicing refers to the practice of partitioning a large study that could have been reported in a single research article into smaller published articles. A set of papers are referred to as salami publications when more than one paper covers the same data, methods, and research question. Both of these are considered unethical and the journal can take action against you if detected.
Therefore, you should be very careful about publishing two papers on the same topic. The data and methods section can be similar, but you have to make sure that you have a new research question and that all the other sections of the paper - the literature review, discussion, analysis of the findings - are completely different. If you feel that the two papers are very similar or have a lot of overlapping content, then it would be better to not publish the second paper at all or publish it as a second part or a follow-up study. You can send a pre-submission inquiry to the editor, giving a short summary of both the papers and asking if they can be published as two separate studies or if the second one can be published as follow up of the previous study.