filter entries by id retrieved from matrix block entry
If I do a similar test:

{% set myVar = ['10032'] %}

{{ dump(myVar) }}


That gives:

array (size=1)
  0 =&gt; string '10032' (length=5)


Just like yours.

{% set entryId = 10032 %}

{% if entryId not in myVar %}
    {{ entryId }} not in myVar
{% else %}
    {{ entryId }} is in myVar
{% endif %}


Outputs:

10032 is in myVar


As expected.  Changing entryId to something other than 10032 gives the expected "is not in myVar".

It should be noted that this line:

is in myVar {{ myVar }}


Will cause an array to string conversion error because you're telling Twig to output an array to the browser and it doesn't know how.