It depends, there’s a trade off. At some point things can become very complicated if you don’t abstract them and put them in their own lib or framework.
The less you use external dependencies, more time for you to focus on your own product instead of solving problems updating those dependencies and replacing them.