When the debt is genuinely uncollectible, which means you can show reasonable collection efforts and a conclusion that payment will not arrive.
For accounting purposes you may carry an allowance for doubtful accounts earlier. The tax deduction comes later and needs the facts behind it documented.
We handle this for founders running US companies.