You need to somehow target the field to the post ID of the post being edited and then only update that post.
maybe something like this (only a quick example)
if (!empty($_POST['star_ratingg'][$post->ID])) {
$star_ratingg = $_POST['star_ratingg'][$post->ID];
$set_comments = $_POST['set_comments'][$post->ID];
// remainder of your update code here
}
<input type="text" name="star_ratingg [<?php echo $post->ID]">
<input type="text" name="set_comments[<?php echo $post->ID]">