Alternatives for deprecated Registry class - Magento 2.3

Starting with the Magento 2 registry deprecated, which has been widely used by developers and extension vendors, is declared deprecated

Class comments often suggest using service classes or data providers, but no examples are provided. In In this article, we’ll show you how to obtain the necessary data using best practices and service classes.