Shortcode for display posts on home page show only one post

On this line:

$out="<div class="row"><div class="col-md-4">

You”re resetting the $out variable for each post. Change that to:

$out .= '<div class="row"><div class="col-md-4">

That will add each new post to the output of the previous post, so that when the output is returned it contains output from all posts.