If a piece of clothing has urine on it, can I put it in the washing machine and wash it twice

Yes washing machine is fine. It washes it twice once for wash and second for rinse