Trains in Sardinia, which are regional connections to and from each city from North to South, are operated by both Trenitalia and ARST (Regional Transport of Sardinia).
There are few lines and limited connections made by regular trains (not high-speed).
On the other hand, there are tourist trains that travel through marvelous itineraries, encompassing the coastal and inland nature, passing through cliffs, mountains, and waterfalls, operated by the Trenino Verde of Sardinia.
Due to the fact that some parts are managed by Trenitalia and others by ARST, it is not possible, for example, to purchase a ticket from Cagliari to Alghero on the Trenitalia website.
What needs to be done is to divide the routes according to the sections and the company that operates them. However, ticket vending machines are generally available at the stations for purchasing tickets.