This page of the Diablo 2 Resurrected game guide explains how to start and complete the third quest - The Search for Cain. As part of this quest, head to Tristram to release Deckard Cain. You can't skip this task.
To reach your destination - Tristram - you have to go back to the Cold Plains, locate the entrance to the Stony Field and then find the Underground Passage that appears among the rocks or as a cave entrance in the fields to get to the Dark Wood. The Underground Passage has 2 levels, but you don't have to head down to the second. The passage to the Dark Wood is on the first floor.
The reason why you're going to the Dark Wood is to find the Tree of Inifuss. It looks like an ordinary tree, but it grows alone and is slightly larger and withered. It is also visible on the map. By interacting with it, you will obtain a scroll - bring it to Akara.
Once you have spoken to Akara, you can read the scroll to learn in which order to interact with the stones in the Stony Field. The stones will start glowing when you interact with them - do it in the correct order to open the portal to Tristram.
Go through the portal. You will find numerous enemies here, including some significantly more powerful ones (e.g. bone warrior archers). This location's mini-boss is the very durable Griswold. He shouldn't cause you much trouble, as you'll have plenty of room to maneuver, although it's still a good idea to slow him down and keep him at a distance. In the middle of the ruined city, you will find Deckard Cain imprisoned in a cage. You can easily release him by interacting with the cage. Cain will then leave for the Rogue Encampment. You may also return to the camp.
Once in the camp, talk to Cain. As a reward for completing the quest, Deckard Cain will be available in every camp and he'll identify any items in your inventory for free. Make sure to visit Akara, as she has a gift for you (a ring).