Coming from Europe, can I work while doing a Master Thesis in USA?
Most often, visitors to the US study under an F1 visa.

F1 visas do not permit off-campus work during the first year, and after the first year off-campus work is limited to work related to the degree; on-campus work is allowed but limited to 20 hours per week.

Schools you apply to will be familiar with having international students attending; you should direct questions about employment opportunities to the programs and schools you may apply for; any larger institution likely has a dedicated office for international student needs and questions.