To clarify, it’s important to note that Timothy was told that all scripture (things written down) was useful. That is, there are no volumes the apostles nor any other writer of canon forbid us to read.
The context of Paul’s reference to “scripture” (3:16) in his 2nd letter to Timothy is v. 15, which refers to Holy Scripture and not other secular writings from which an excerpt might be taken.