You can just buy train tickets (probably just to Lisbon) when you get to Porto. You could buy them at https://www.cp.pt/passageiros/en (don't bother with Eurail) if you want to try buying in advance, but Portugal's trains aren't really that expensive, so you will save some money but maybe not much buying in advance. You can check prices right now for say tomorrow and see what last-minute prices are like. I think they haven't updated their schedules past early July yet so you may not be able to buy tickets past then right now, anyway.
Trains to Sintra do use a local rail operator, a commuter rail system with smart cards. You swipe the smart card as you enter the station to get to your stop (and may need to swipe it again to exit in Sintra.) There are direct trains from Oriente to Sintra, and you can buy them at a machine (or probably from an agent). I was in Lisbon last week and did a day trip to Sintra. I bought a Viva Viagem (smart card) at a machine for 50 euro cents, then added a round trip ticket to it at the machine. The card can be re-used later (new tickets added to it) at machines.