Sure, if you want to understand stuff written in C/C++ then that's an obvious use case for learning it. The same goes for any language. Ruby isn't worse than Python by any stretch but my personal view is that it got really popular due to "Ruby on Rails", on its own it's very similar to Python which seems more widely used.
If security is what you mainly care about though, maybe you'd just enjoy diving straight into rust rather than C++.
If security is what you mainly care about though, maybe you'd just enjoy diving straight into rust rather than C++.