In Germany, when you book in advance, there are two kinds of tickets you can book.
The first kind are discounted (Sparpreis) tickets for long distance trains. These ticket offer a discounted price, often substantial, in exchange for committing to a specific train (date and time). Sparpreis tickets have to be purchased in advance.
I understand that you can now get seat reservations for a few regional trains, but, in general, you can only get seat reservations for long distance trains.
The second kind offer no price reduction for advance purchase. Some of these tickets, when purchased in advance, also come with a time limitation. Länder-Tickets, are all-day passes for one or more German Land (or state) and can often be far less expensive than buying point-point tickets all day long. Whenever you buy a Länder-Ticket, it comes with the date of validity stamped on it. If you buy it on the date you want to travel, no problem, but if you buy it in advance, you must use it on the date printed on it, or lose it. There is no exchange or return of Länder-Tickets. I would guess that at least half of all tickets I buy in Germany are Länder-Tickets, bought when I arrive at the station that day.
Getting back to Sparpreis tickets. There are Super-Sparpreis ticket that offer the biggest discount; they are non-refundable, non-exchangeable. They can only be used for the long distance train specified on the ticket. Regular Sparpreis ticket can be exchanged for a different date or train, but at a penalty.
So my advice, at least in Germany, is to buy discounted advance purchase tickets only for long distance trains (Sparpreis) when you know you can commit to that specific train. In almost all other cases, buy the tickets at the time of travel. Unless it is an uncommon regional train that offers reservations, advance purchase of a regional train ticket offers no advantage. The tickets for those trains never sell out. If the train is crowded, you stand until a seat becomes available, no matter when you bought you ticket).
I did once make an exception to that rule. Years ago, I was arriving at FRA on a trans-Atlantic flight. The train connection I really wanted to take was leaving a little too soon after my arrival to be able to make it, but if my flight arrived early, I could make it. However, with an early arrival I might just make it, and having to buy a ticket might mean the difference. So I made an advance purchase (no discount) of an open ticket that showed that train. As it turned out, my flight was a little late, so I didn't make the train on the ticket, but since it was a full price ticket, I just caught the next train two hours later, no penalty. Today, some airlines, like Lufthansa, offer Rail 'n Fly tickets, usable on any train (even long distance) to your destination that day or the next, for a low price of about 33€/P.