Depending on context, you may need global $post;
first, so you’re not operating on a different local var. You also already have a post object, so you could just assign that directly to $post
before calling setup_postdata
…
However, you can skip all that and use functions that accept a post object argument-
$prevPost = get_previous_post(true);
if($prevPost) {
echo get_permalink($prevPost);
echo get_the_post_thumbnail($prevPost, 'thumbnail');
}
Most of the template functions have alternates that work this way.