Two things that I noted in the article you linked:
a) It only mentions iMac models up to 2015, which suggests the original text is rather old. It says the article was "updated" in November 2019, but it is unclear what was updated. There is no mention of Catalina.
b) There is one incorrection in the article. It says
"Your iMac should automatically recognize the presence of a digital video signal at the Mini DisplayPort or Thunderbolt port and enter Target Display Mode."
This is (fortunately!) not true. You have to explicitly press Command-F2.
I always have the Thunderbolt cable connected between the MBP and iMac, but I do not always want to use TDM. Often I want to do something else on the iMac.