Drupal 8 / 9 entityTypeManager get multiple comments by cid

To get multiple comments by comment ID (cid) using the entityTypeManager in Drupal 8/9, you can use the following code:

$comment_ids = [1, 2, 3]; // Replace with the actual comment IDs you want to retrieve

$comment_storage = \Drupal::entityTypeManager()->getStorage('comment');
$comments = $comment_storage->loadMultiple($comment_ids);

This code creates an array of comment IDs that you want to retrieve, and then uses the entityTypeManager to get the comment storage. Finally, it loads multiple comments using the loadMultiple() method of the comment storage.

Please note that you need to replace [1, 2, 3] with the actual comment IDs you want to retrieve.