I am constantly losing track of which function is where and I’m never quite sure if I have code in the right place.
That's not a Rust concern but a software architecture concern. The software architecture pattern you follow determines how the project is structured taking into account what requirements it needs to comply to address common requirements, such as ensuring that things that change a lot will be easier to change and things that don't change won't get in the way.
I recommend you read up on topics such as layered architecture, hexagonal architecture/ports and adapters, clean architecture, etc.