Is this with a specific app, or all apps? I've tried three different apps (Messages, Teams, Element) on my machine and all of them open a new tab in the existing Safari window.
I have "Open pages in tabs instead of windows" set to "Automatically".
With “Open pages in tabs instead of windows” set to “Always: Open webpages in tabs.”, Safari will always create new tabs, regardless of the application the link is coming from.
The only instance where it will open a new window is when you have the Smart Search field selected in the current window. https://support.apple.com/guide/safari/tabs-ibrw1045/16.1/mac/13.0