A first tip to avoid knots in the hair and especially to detangle them well is to do it in the shower or immediately after the shower when the hair is still damp.
On damp hair, never dry!
If you have curly or frizzy hair this tip is all the more true. Above all, don’t try to untangle your hair when it’s dry… It’s real torture!
To quickly detangle your hair, always use a wide-toothed comb, which will be much more effective than a brush.