1.. Go ahead and Install Yoast Test Helper plugin.
2.. Activate it and Find its setting under Tools > Yoast Test
3.. Now the start the magic by clicking “Reset Indexables & Migrations” button
4.. All Set! Now go to Yoast SEO > General and click on Start SEO data optimization
Enjoy 🙂 Canonical URL set for each and every page correctly.