I assume you are only talking about connections using the BW ticket? The best way is IC, not the most cost effective though!
For a one-way trip Stuttgart - Heidelberg, the IC is definitely more cost-effective at only 1 Euro extra cost compared to BWT.
Why they don't make a faster/direct connection is beyond me.
There's a direct connection every hour by IC, and a direct connection every 2 hours by RE.
And since there's an active ITF node in Mannheim, you'd also wait all of 5 minutes for the next S-Bahn to Heidelberg there.