Without going into incredibly sophisticated syntax trying to match bits and pieces of a url, you can disqualify already-tagged urls using (*SKIP)(*FAIL)
and then only match the urls from your domain.
Code: (Demo) (Regex101)
$tweets = [
'This is a sample tweet https://tr.co/sdfhnjn3',
'This is a sample tweet <a href="https://tr.co/sdfhnjn3">https://tr.co/sdfhnjn3</a>',
'This is a sample tweet https://example.com/sdfhnjn3',
'This is a sample tweet <a href="https://example.com/sdfhnjn3">https://example.com/sdfhnjn3</a>'
];
var_export(preg_replace('~<a [^>]+>.*?</a>(*SKIP)(*FAIL)|https?://(?:www)?tr.co/\S*~', '<a href="$0">$0</a>', $tweets));
Output:
array (
0 => 'This is a sample tweet <a href="https://tr.co/sdfhnjn3">https://tr.co/sdfhnjn3</a>',
1 => 'This is a sample tweet <a href="https://tr.co/sdfhnjn3">https://tr.co/sdfhnjn3</a>',
2 => 'This is a sample tweet https://example.com/sdfhnjn3',
3 => 'This is a sample tweet <a href="https://example.com/sdfhnjn3">https://example.com/sdfhnjn3</a>',
)
*only the first element was actually updated, the others did not qualify.