Q:

which are best method to get collection in magento 2

I am creating a custom module. which is preferred method to get collection. i need to know the advantage and disadvantage these method?
objectManager
$objectManager = \Magento\Framework\App\ObjectManager::getInstance(); 
$productCollection = $objectManager->create('Magento\Catalog\Model\ResourceModel\Product\Collection');
$productCollection->load();

Factory 
protected $_productCollectionFactory;

    public function __construct(
        \Magento\Catalog\Model\ResourceModel\Product\CollectionFactory $productCollectionFactory,
        array $data = []
    ) {
        $this->_productCollectionFactory = $productCollectionFactory;
        parent::__construct($data);
    }

    public function getProductCollection()
    {
        /** @var $collection \Magento\Catalog\Model\ResourceModel\Product\Collection */
        $collection = $this->_productCollectionFactory->create();
        return $collection;
    }

A:

you should use the factory approach.
The advantage is: you may decide at one point to add some common behavior when a certain collection is retrieved. If the factory is autogenerated, you can just create your factory class and add the behavior in your code. This way, your factory will be used instead of the autogenerated class.
It's kind of similar to using getName method instead of getData('name').  
The advantage of using the object manager is that you have to write less code, but this does not make it right.

A:

Factories are special objects that have only one purpose: to create an
  instance of one non-injectable class or interface.

See more details in official documentation

