The necessary transfer time is going to depend on the station. If it’s a small town with two tracks (one in each direction), making a short connection is easy. Sometimes it’s as simple as getting off one train, waiting a few minutes for the next train to arrive, then getting on the next train.
If you are using the dbahn app (DB Navigator), it will tell you the anticipated track #. If you arrive at track 2 and depart from track 3, it could be as simple as stepping off the train, walking 10 feet across to the other side of the platform and getting on the awaiting train. Switzerland is known for making it that easy.
I’m comfortable with a connection time of about 20 minutes. This gives you a little buffer, in case of delays. Sometimes a transfer happens at a big station. You might arrive on platform 2. And depart on platform 26. You have to go downstairs, or down an escalator (if it’s working!). Then walk along the tunnel to platform 26, go up stairs (or an escalator if you’re lucky). Then find the section of the track (A, B, C) where your train car will stop. The app will tell you this info.
Once you’ve arrived, keep an eye on the boards for any last minute track changes. If everybody waiting around you suddenly starts heading downstairs, that’s a sign! It means you’ll have a scurry to get to the new platform.
Train platforms aren’t usually announced until about 20 minutes before departure, so arriving earlier than that just means standing around waiting to know which platform you need to get to.
I would buy directly from dbahn, or whatever the local train company is. If a route connects two different country’s train systems, check prices on both sites. We found a big price difference between dbahn (Germany) and SNCF (France) for the same exact trains when we traveled in December.
Check out Seat61.com for extensive train info.