Is there a better practice than using Object Manager?

I was wondering if there was a better way to use the resources than object manager, here is how i’m currently using the category factory’s. I am very new to Magento. <?php namespace XX\TierPriceSummary\Block\Adminhtml\Index; class Index extends \Magento\Backend\Block\Widget\Container { protected $_customerGroupsCollection; protected $_productRepository; protected $_resource; private $storeID = 1; public function __construct( \Magento\Backend\Block\Widget\Context $context, \Magento\Customer\Model\ResourceModel\Group\Collection…