If you are using a front-loader, it is recommended to add detergent at the start of the cycle. For top-load washer, it is safe to wait until the machine is filled with water before adding detergent.