What link are you talking about? A Team invite link? Or just a link someone sent you? You can't join teams with a link has to be an invite. If it is I have a hunch of the cause but clarify first please thanks.
i am the team owner, i go to the team name and click More options > Get team link i sent this link to my partner, and he got the error: You’ll need permissions to access this team or channel. Try contacting the team owner or admin.