Indeed it is by the scriptures, but there are two witnesses and not just one and the other witness is the Holy Spirit by which God inspired the scriptures to be written to begin with and without which no one will rightly understand the written scriptures either and therefore it isn't as many affirm "sola scriptura".
You use the scriptures like all those who are in the present apostacy do also, but you are not being led and taught of the Holy Spirit in them and that is why you are not understanding the written scriptures.
So it isn't just the scripture alone, otherwise everyone would be getting the same doctrine from them and it is obvious that they are not.
1 Corinthians 2:13-16
13 This is what we speak, not in words taught us by human wisdom but in words taught by the Spirit, explaining spiritual realities with Spirit-taught words. 14 The person without the Spirit does not accept the things that come from the Spirit of God but considers them foolishness, and cannot understand them because they are discerned only through the Spirit. 15 The person with the Spirit makes judgments about all things, but such a person is not subject to merely human judgments,
16 for,
“Who has known the mind of the Lord
so as to instruct him?”
But we (who are taught and led by the Spirit) have the mind of Christ.