Valletta is a small city which is easily walkable. Taxis and buses are also available, and the costs are reasonable. The average taxi fare is around €10-15, and the bus fare is €1.50 for a single journey. If you prefer, you can hire a car to explore the surrounding areas, but keep in mind that parking can be difficult in Valletta.
If you have more than 2 days, consider visiting other attractions in Valletta such as the Grand Master's Palace, the War Museum, and the Malta Experience. If you have less time, skip the boat trip to Three Cities, as it's a longer activity. Make sure to wear comfortable shoes as the streets in Valletta are steep and narrow.