How to restrict access to view a block for a certain role?
Visibility Block base on the Role is built-in Drupal 8 feature. 

go to admin/structure/block and click on your desire block configure button



then in Visibility section, there is Role that you can define for which role your module  show , or not to show.