unable to understand the rules for producing sounds

It sounds like you may be experiencing difficulties with articulation or phonology. It is important to seek help from a speech-language pathologist who can assess your specific needs and provide therapy to help you improve your ability to produce sounds accurately. With the right support and practice, you can work towards clearer speech and communication.