Call block in controller
public function __construct(
...... \Vendor\Module\Block\Blockname $blockname,
.....)
{
$this->blockname = $blockname;
}
public function execute()
{
$value=$this->blockname->blockmethod();
Use saveAttribute() method to save custom product attribute sample attribute
$mypro=1001;
$productRepository=$objectManager->get('\Magento\Catalog\Api\ProductRepositoryInterface');
$product =$productRepository->getById($mypro);
$product->setBestPrice(0);
$product->getResource()->saveAttribute($product, 'best_price');