I'm studying differential geometry in order to learn general relativity. My advisor recommended the following book: Semi-Riemannian Geometry, With Applications to Relativity, by Barrett O'Neill.

https://www.amazon.com/Semi-Riemannian-Geometry-Applications-Relativity-Mathematics/dp/0125267401