Add query condition for referenced user by user ID
if the machine name of user entity referenced in user_points content type is for example field_my_user, the following condition can be added to the query above to select only nodes with referenced user equal to $user_id

-&gt;condition('field_my_user.entity:user.uid', $user_id)