Again, it will depend on your grasping capabilities of learning a new CMS. However, a 20 to 30-hour course on sites like Udemy on WordPress is enough to get the ball rolling for a web developer.
The answer to the question is that whatever time it will take for you to complete a 30-hour course from Udemy is when you will need to learn WordPress.
And indeed, it is worth learning WordPress as a web developer in 2021.