As others mentioned there's plenty to see in Lisbon but if you want to go to Sintra on your own , some helpful info.
Assuming the ship docks at the main cruise terminal in Lisbon ( there's another in Alcantara) opposite Santa Apolonia train station:
-walk across the street to Santa Apolonia train station, go downstairs to the Metro ( subway)
- buy a Navegante Ocasional card and load it with money for zapping at the Metro and train to Sintra
- take the Metro blue line , get off at Restauradores, not counting the start station at Santa Apolonia it's 3 stops.
- at Restauradores you can use the escalator but if it seems confusing go to street level walk south 1 building, you'll be in front of the Rossio train station building ( the entrance looks like 2 inverted horse shoe arches)
- take the train to Sintra, use the Navegante Ocasional card zapping, Sintra will be the last station
-reverse on the way back
You can also take a taxi from the cruise terminal to Rossio train station, about 10 minutes.
Navegante Ocasional card is non refundable and one per person.
Most Sintra attractions require pre purchased (online), timed tickets ( go as early as possible, timing is more of a suggestion, you'll have to wait in line).
In Sintra it's easier to use a taxi to reach the attractions ( some people prefer Tuk Tuks, ) agree on a price estimate before using.
When cruise ships are in town it's thousands of people going to the same attractions at the same time, expect line ups and delays.
Metro site
https://www.metrolisboa.pt/viajar/mapas-e-diagramas/
Navegante Ocasional card info
https://www.metrolisboa.pt/en/buy/
Diagram of Metro and train
https://www.cp.pt/StaticFiles/Passageiros/3_viajar/0_servicos/lx/ligacao-cp-metro-lisboa-baixa.pdf