How do I extend the amount of frames on a 2d animation?
You can change the number of frames for the project if you type it at the bottom right of the timeline window.

Note that you've enabled an alternative preview range, that is different than the project's frame range.


Preview Range(clock icon)
This is a temporary frame range used for previewing a smaller part of the full range. The preview range only affects the viewport, not the rendered output.

Read:
https://docs.blender.org/manual/en/latest/editors/timeline.html?highlight=preview%20range