You'll have to use a database, unless you want to store the data in-memory. However, in-memory data (python globals, for example) will be lost when the server performs a reboot - or crashes. This will be especially annoying during development, because all the data will be reset whenever you make a change in the code.
You could use an in-memory database like redis. This works very similar to using globals directly in the code, but it is a database and can be configured to save the data to the disk and survive crashes, etc...
Considering the sharing of data between users: I dont see a good way around having the users chose a login and associating the data with the user which is currently logged in. If its really just a for-fun project, you could use the User Agent and their IP address to identify users, but I dont recommend this - like, at all. This would be similar to browser-fingerprinting, which gives you a high chance of identifying users, but you can never be 100% sure.
What you could do for example is give the user a JWT, and just hand them out with a generated username. The user will be "that user" for as long as that JWT is valid. This means you need to save it on the client-side and send it with every request, which makes it slightly more complex.
I am fairly new to the Python Flask world (or web applications in general), just started my first project on Friday using Jupyter Notebooks and am now trying to build a Flask web app from it - so please bear with me :)
My app creates pareto-efficient Portfolios based on the user-input.
On the index page I have a couple of input fields for user-input which I collect through a form. On calculate the app routes to the results page and in the process runs the data from the form through some calculations, then displays some tables with infos and plotly graphs.
Now I would like the user to be able to further manipulate the data but the data isn't accessible / persistently saved. - I've read something about using global variables or the session dict which are not recommended.
So I am asking myself two things:

What is the easiest way to implement the persistently save my objects & lists to manipulate the data between different routes
In case of having to use a database: What is the smartest logic to work with in that scenario to be able to receive the correct data in case of using a database (e. g. 50 people use the web app simultaneously - how do I make sure that user X retrieves his earlier data instead of the data from user y -- the web app does not require a login and I also don't plan on implementing one as I wanted this to be as quick and simple as possible)

Your help is much appreciated - I've probably written 5000 lines of code this weekend and maybe I just can't see the forest for the trees right now
Simple way to store objects, variables and lists to use between routes