Here is a project focused on predicting trajectories for projectiles, thrown object and such. It's nothing too fancy but a must-have for any project that requires such tools!
Youtube walkthrough & explanation: https://www.youtube.com/watch?v=rgJGkYM2_6E&ab_channel=ForlornU
This project uses the "new" unity input system, if you are trying to only copy the scripts into an already existing project you need to setup that input handling, see video walkthrough for any questions
This is an entire unity project however and you can download and use the entire thing