It seems like you are trying to include a Twitter embedded user timeline inside a WordPress theme component (such as a widget) with the Twitter @username populated based on its rendering context (site, term meta, etc). This is not a feature supported by the official Twitter plugin for WordPress.
Assuming you are a developer making your own plugin, I’ll explain how you could make it work below.
A Twitter embedded user timeline currently requires a widget ID storing a default @username and some widget preferences. You would create a new widget from the main Twitter account of your site or network, which would display its latest Tweets by default.
https://twitter.com/settings/widgets/new/user
The generated markup looks like this:
<a class="twitter-timeline"
data-widget-id="{widget_id}"
href="https://twitter.com/{screen_name}"
data-screen-name="{screen_name}">
Tweets by @{screen_name}
</a>
Your widget_id would be the same across your site or network. You would pass the screen_name component based on the display context, overriding the Twitter @username stored with the widget ID. You might pull that screen_name value from term meta for a category or general site options if the Twitter account varies by site.
If you’re using the official Twitter plugin for WordPress there’s an opportunity to store a Twitter @username for a site as well as a WordPress user. The site’s Twitter @username is stored in the twitter_site_attribution option; a WordPress user’s Twitter username is stored in the twitter user meta value.