"Pendant" is used to say how long an action lasted or will last before coming to an end.
J'ai vécu à Paris pendant 3 ans, de 2010 à 2013 (I lived in Paris for 3 years, from 2010 to 2013)
Je vivrai à Paris pendant 3 ans, de 2020 à 2023 (I'll be living in Paris for 3 years, from 2020 to 2023)
Using "pendant" is not compulsory in these contexts. Most of the time we say "J'ai vécu à Paris 3 ans" / "Je vivrai à Paris 3 ans".
"Depuis" is used to say how long an action has been going on (without knowing when/whether it will come to an end).
Je vis à Paris depuis 3 ans (I've been living in Paris for 3 years)
Je vis à Paris depuis que j'ai rencontré ma femme (I've been living in Paris since I met my wife)
The period of time doesn’t need to be accurate.
J’ai vécu à Paris pendant quelque temps (I lived in Paris for some time)
Je vis à Paris depuis quelque temps (I’ve been in living for some time)