You need to observe topics with code from the same origin as the code you call to access topics.
To access topics from xyz.com that you've observed on abc.com, you'll need to call document.browsingTopics() from an iframe embedded on abc.com that has a src with origin xyz.com.
Alternatively, you could use headers to observe and access topics.
You might find the following two demos useful as a starting point: