Do the Scriptures themselves say to write lines when making a copy of the Torah, or if this is an oral tradition?
You may be looking for this information in Maimonides, Hil. Sefer Torah 1:12:
הֲלָכָה לְמשֶׁה מִסִּינַי שֶׁאֵין כּוֹתְבִין סֵפֶר תּוֹרָה וְלֹא מְזוּזָה אֶלָּא בְּשִׂרְטוּט:
It is a rule dating back to Moses who received it on Sinai1 that a Torah scroll or Mezuzah may only be written on parchment that has lines.
This is not mentioned anywhere in the Written Law - but it's well documented in the Oral Law, in this case in the Talmud.
See, for example, Megila 16b which states:
דברי שלום ואמת אמר רבי תנחום ואמרי לה אמר רבי אסי מלמד שצריכה שרטוט כאמיתה של תורה
With regard to what is stated: “Words of peace and truth” (Esther 9:30), Rabbi Tanḥum said, and some say that Rabbi Asi said: This teaches that a Megilla scroll requires scoring, i.e., that the lines for the text must be scored onto the parchment, as the Torah itself, i.e., as is done in a Torah scroll.