In the WeTV version of Three Body Problem (ep. 12, minute 12:31) Wang Miao tells detective Shi Qiang not to smoke in front of Wang Miao's daughter. While the detective hates being told not to smoke, he replies "知道了". Would that mean something different from saying "明白了"? I wondered if maybe 知道了 suggests Shi Qiang will actually not smoke because he knows not to, and 明白了 might suggest he understands the request without agreeing to it. (in fact he starts to smoke three times but always gets interrupted so he never does smoke in front of her.)
明白了 is translated as "I understand it now" (thank you for your help). It is usually used as a response to an explanation on a topic. One situation is when a student asks a question to the teacher. After the teacher give the student an explanation in detail, the student would say 明白了.
知道了 is translated as "I am informed about it" (you or someone told me about something). It is usually a short answer to a dialogue and wish to put an end to the conversation.