So can act as a substitute for an adjective, adverb, or a whole clause if we don’t want to be overly repetitive:
Richard was enraged at his brother’s stupidity and he had every right to be so. (= to be enraged)
Elon considered the suggestion seriously and Helen even more so. (= even more seriously)
Mike’s going to be there. At least I presume so. (= that he is going to be there)
Do so (did so / doing so, etc.) is used instead of repeating a verb phrase when it is clear from the context what we’re talking about.
We use one as a substitute for a singular countable noun and ones for a plural noun when we don’t want to be overly repetitive and when it is clear from the context what we are talking about.
An auxiliary verb (be, have, can, will, would, etc.) can be used instead of a whole verb group or instead of a verb in order to avoid repeating words from a previous clause.