A breakup presents a need to heal, and an opportunity to learn and grow. Don't shortcut the process!
There are "rules of thumb" that people use, so many months of "healing" for so many years that your prior relationship lasted. Those rules are of course, just very rough guidelines. How long does it takes to be ready? That depends on a lot of things...the length of the relationship, was it your decision to get out or was it your partner's decision, did you see it coming for a long time (and hence start grieving and healing before it was finally "over") or did it catch you completely by surprise?
The time off is not just to grieve and to heal from the rejection (real or imagined,) the failure (real or imagined,) and the loss. It is all of that but also, it is a time to readjust your thinking, to learn to feel whole and healthy as an individual, and to remember who you are as an individual, separate from who you were in your prior relationship. For certain activities, or ways of decorating your house, or clothing fashions, or whatever: Do you "really" like that yourself, or was that part of a compromise (even a happy one) that you made in the context of your prior relationship? Time alone helps you learn those things.
And of course, time alone gives you space to evaluate the past relationship and see what you can learn from it. What did you do that made it good? In what areas were you perhaps not as good as you should have been? What were the things your partner did that worked for you, or not? If your last relationship was bad, you want your next one to be better. If your last relationship was good, you aren't going to duplicate it but you can consciously look to find some of the same wonderful things in your next partnership.
All of this is sabotaged if you jump out there too soon. Doing that, when you aren't whole and happy, when you haven't grieved, when you haven't learned what you need to learn, is what is called a rebound relationship. It is selfish because it is a way of "using" someone else to make you feel better. Not only does it short-circuit the healing, learning, and growing process, but it is not likely to be an ongoing, successful, mutually satisfying relationship. How could it be healthy when you yourself are not yet healthy and whole?
Yes, doing all of this the right way, patiently, consciously, is difficult...but it is a very necessary process to go through, to maximize your chances of, in time, finding a real and satisfying partnership and love.