Dumb used to almost primarily mean the inability of an individual to speak because of congenital deafness. Some people are born deaf, dumb, or blind. Animals were also considered to be dumb because they could not speak. The word dumb is also used in related usages, such as being provisionally unable or unwilling to speak.
Dumb is also expressed speechlessness. Over time, the words deaf and dumb became politically incorrect, and people with such an affliction are called mute or speech and hearing impaired. Dumb is oblivious, and stupid is more about being careless or childish.
A dumb person doesn’t know any better, but a stupid person does. For example, a dumb person might do something by accident, such as leave out the major ingredient when cooking a meal. A stupid person does acquire knowledge from their mistake, and they repeat it.