How to get Shipment comments by comment id Magento 2?

You can check the shipment comments by Magento 2 using Shipment Comment Repository Interface with shipment id.

Shipment comment repository interface used to fetch comment data of a shipment. Useful Interface is, Magento\Sales\Api\ShipmentCommentRepositoryInterface

Check the code to fetch comment by comment id,

call method from a template or PHP class,

Pass Comment id, you need to get a comment for the shipment.

You got the response as shipment comment data.