Recently, with my colleagues, we sent a paper to a magazine. They needed more than 50 days to tell us that they did not accept labor. Meanwhile, I reminded them twice that the work was sent and I do not have any information.
Ideally the editor should give reasons why the paper was rejected. This would enable you to address the concerns and then re-submit. If the reason is that the paper does not resonate with a particular journal, then you can try elsewhere.
Simple! If I am lucky and the Editor has given me reasons for rejection / comments, then, I would work on the comments and submit the paper elsewhere. However, there is need for seriousness because some Editors are in different journals in different capacities. Once the paper is rejected, thorough work on that paper needs to be done.