Error while excluding a post from another loop (using its ID)

post__not_in accepts an array so change

 <?php $postid = get_the_ID(); // capture the id ?>

to

 <?php $postid[] = get_the_ID(); // capture the id ?>

and you’ll be fine.