Relative pronouns vs Subject pronouns: It/that

Relative pronouns vs Subject pronouns: It/that

Good morning.

How can I understand the differentiation between using “that” or “it” in regular usage?

Example:
I am chatting with somebody online and I have been asked not to do something to which I responded:
“Done,I will not do “that”…”

Later I was thinking if “that” was the better choice over “it”.
“Done, I will not do “it”…”
and now i am stuck in my mind! (smile).

I will appreciate your assistance, and if you could please either pitch in some examples on different situations for normal usage of these two words or send me a link where I could recurre into myself for further explanation on this topic it will be awesome.

In the later paragraph, did a make a proper use of all of the prepositions?

Thanks again and God Bless you.
Cisco.

I think both ‘it’ and 'that are all right.

I think “it” is more natural: Okay, I won’t. Okay, I won’t do it, I promise.