[noun] + をもとに [noun] + をもとにして [noun] + をもとにした + [noun]
をもとに means "based on": the noun in front of it – a story, data, an experience, a recipe – is the material something new is made from. It goes straight after a noun, and the rest of the sentence says what was made or done with it. もと is also written もと基 or もと元.
The source takes を, because the phrase is "make ~ the base". The に of にもとづいて基づいて does not carry over.
To describe a noun, the pattern becomes をもとにした.
をもとに takes something as raw material and makes something new from it, and the result can stray far from the source. にもとづいて基づいて means you follow the basis and stay inside it: rules, laws, facts, data.