My main advice: always under-promise and over-deliver. Managers don’t see code typically, they usually are more focused on deadlines. Be very pessimistic when discussing deadlines. Take your initial estimate and double it to account for potential problems. Be very clear about risks beforehand. And lastly, no one cares if you wrote some chunk of code or if someone under you did, all they care about is knowing who lead the team that delivered it on time. Be that person and you will be successful at almost any company.