How to find or devise the formula needed to craft a spell scroll, or magic item of any other kind, is not fully detailed (on purpose, I believe) so it is up to each DM to figure out what works for their group.
What is said in the DMG is that the formula should be one rarity category more rare than the item it would allow you to create, unless you want more prominent magic items for setting style reasons (i.e. a high-magic setting in which there are people alive in the world currently that can create legendary items).
I take that further and treat the formula as a magic item itself for purposes of determining the cost to buy it if it is found available for sale, and for purpose of crafting it yourself, with the exception being that a formula does not itself require a formula.
Leaving out my other house-ruling to the magic item crafting system, that would mean that in order to create the formula for a 1st level spell scroll, you would need to be at least 3rd level and have spell slots, and would spend 100 gp to research/devise the formula, taking 1 day per 25 gp (so 4 days) unless assisted in the task by more 3rd level characters.
That formula would then let you create a 1st level spell scroll with any 1st level spell that you can cast (or have someone that can cast it present to aid in the crafting), taking 50 gp and 1 day per 25 gp (so 2 days, again unless assisted by others).