Visit: https://devhubby.com/thread/how-do-i-get-the-current-category-in-magento-2