We need the name of your hotel to determine whether any form of public transportation makes sense for either trip. The tram may work from Galataport to the hotel, depending on its location. You'd have a few blocks to walk to get to the tram stop, but that area is relatively flat. But there may not be a tram stop convenient to your hotel, and sidewalks along many of the streets in the Old Town are narrow and crowded, so a long walk with luggage can be a trial.
The need to acquire a transit ticket or an IstanbulKart (stored-value card) makes the public-transit option less attractive than it might otherwise be. The IstanbulKart machines can be finicky. However, you may need to use transit for other reasons during your stay in Istanbul, so you may have to deal with the machines anyway unless you can acquire a loaded IstanbulKart from your hotel (probably unlikely), from one of the tourist offices in the Old City (they do sell them, with 30 TL loaded) or at one of the convenience stores in the area (again with 30 TL on them; I'm not sure what percentage of those sell the cards).
Using transit to get to the airport is even trickier; there's a good chance multiple transfers would be required.
Where are you staying?
Some cab drivers will quote a fare in euros rather than Turkish lira, and some hotels quote car-service fares in euros; I assume the drivers would accept lira, but any time you pay in a different currency, there's a risk the service provider will use a non-standard exchange rate. Goods at one of the airport shops (maybe all of them) were priced in euros. The posted exchange rate for use of Turkish lira made the TL cost a bit higher than the euro cost. The difference was minor (probably less than 1%), but it was there.