The web intent link uses the @ handle or the ID of the referenced account.
https://twitter.com/intent/follow?screen_name=NASA
Add Twitter’s widgets JavaScript to the page if you would like managed child windows and events.
https://platform.twitter.com/widgets.js
Add a class token of twitter-follow-button to the anchor element if you would like to style the link as a follow-button. The follow button styling requires Twitter’s widgets JavaScript on the page.
<a class="twitter-follow-button">
Put it all together and you get a template:
<a class="twitter-follow-button" href="https://twitter.com/intent/follow?screen_name={username}">Tweets by @{username}</a>
<script async src="https://platform.twitter.com/widgets.js"></script>