Compared to Italy, transport in Germany is quite expensive, even tickets for regional trains. Therefore, an extensive carsharing network has developed with which university cities are well connected: https://www.blablacar.de/
An alternative is also Flixbus which offers bus trips throughout Europe.
If you prefer travelling by train, you should buy a so-called My BahnCard. The My BahnCard 50 is available for all persons under the age of 27 from 79.90 euros, the My BahnCard 25 from 39.90 euros. You get a 50% and 25% discount on the tickets respectively. In addition, Deutsche Bahn often has low-cost offers for early bookers that can be combined with the BahnCard. For people aged 27 and over, there is the ‘classic’ BahnCard, which is more expensive.
There is also the Deutschland-Ticket for 58 euros. With this ticket, you can use all means of public transport in Germany, including buses, regional trains, trams, underground trains and suburban trains. As with the Bahncards, this is a subscription model. The D-Ticket is automatically renewed on the 10th of each month.
Many federal states also offer a cheaper version of the Deutschland-Ticket for students in the form of the Deutschlandsemesterticket. More detailed information on the offers for students can be obtained from the respective universities.