I have Custom Sharing rule
In After Insert trigger. I don't get public group Ids or User ids shared through custom sharing rule.
List<Objcet__Share> sharedUsers = [select Id, ParentId, AccessLevel, UserOrGroupId, RowCause from Objcet__Share where parentId = recordId];
This list returns only one record that is the owner of the record but actually, two groups are assigned to this through custom sharing.