I'm new to shiny also but have made a few applications in it over the last few months. A few things that have helped me a lot as a beginner:
Find a template online for an app that follows your same general structure and build on that. It's very important where your data comes from. Does the user upload it? Is it built in example data like mtcars? Will you be reading in a file which you'll put in the directory when you deploy the app? Considering this when choosing a template has helped me a lot.
You can write functions outside of ui and server and then call those functions within ui or server.
Hopefully somebody else can explain the logic behind reactives, because I sure don't understand them well enough myself yet. If you're using a static dataset (not user-uploaded), you can modify it 'as usual' anywhere in server, but anything which depends on user input must be in some reactive statement (such as a renderPlot({}) which might be useful in your case).
In my limited experience with shiny it's been a lot of trial and error, but once things start to click it's so rewarding seeing your code come to life in a beautiful interactive application!
there are a number of resources online for learning to build Shiny Apps. I recommend working through the lessons at https://shiny.rstudio.com/tutorial/#get-started as a starting point.