Let me start by saying that the worst time to look for a new job is when you don’t have a job because you might take the first job that comes along even if it is not the best role for you.
The best time to look for another position is when you have a job, and you can use that as leverage to strategically find a new position that is going to offer you career growth.
When you have a job, you aren’t desperate to find another position and you can take some time to make sure you are moving into a stronger position that is better than the one you have now. This way you are improving your situation vs, taking any job because you need a job.