You can use Drupal::entityQuery()
& Node::loadMultiple()
to load all the nodes of your given type:
$nids = \Drupal::entityQuery('node')->condition('type','my_custom_type')->execute();
$nodes = \Drupal\node\Entity\Node::loadMultiple($nids);
Example 2 get published nodes not all:
$nids = \Drupal::entityQuery('node')
->condition('status', 1)
->condition('type', 'YOUR-NODE-TYPE')
->execute();
$nodes = \Drupal\node\Entity\Node::loadMultiple($nids);