As you are new, the mistake you did is understood. But please keep in mind, never ever did a free demo or test. If the clients ask for a demo, tell them clearly for hiring first. Asking for a free work (demo or test whatever it is) is a direct violation of Upwork policy. If any clients ask for it, you can avoid them or also can inform the Upwork support.
Most likely you were scammed. NEVER EVER send a FREE demo with the buyer material. Your job is tricky. Even if they hire you scammers can find ways (and there are ways) not to pay you or pay you less by threatening bad review and countless other excuses.