The recording engineer goes to the store and looks for the best possible products for the finished meal. The mixing engineer is the chef who cooks all of these products together. The mastering engineer is the chef who serves them and presents them in an appetizing way. Before you know it, they'll offer you discounts if you decide to do all the tracking, mixing and mastering at their facilities.
Keeping everything under one roof can definitely lower the price. Soundbetter, which is an online mixing service, has a calculator that apparently calculates the cost of producing and mixing a song, but since the site works with fixed prices, it seems to me that the prices in the calculator are actually higher than the average price my customers pay. If you're going to go to a studio like that, I suggest you set aside close to the minimum amount of time and be ready to come back later and finish the song. In a recording studio, time is precious, both figuratively and literally, so it is highly recommended that you set realistic goals for recording audio and that you are prepared to work efficiently.
This will make the cost of recording a song much lower and, as long as the sound engineer in the smaller studio is talented, the final product will be better, since you'll have more hours to work on your song with the same budget. For example, it takes time to set up all the audio equipment, such as microphones, preamplifiers, studio monitors, instruments, and any room modification, and much of the time you spend recording will be spent remaking takes, applying effects to different tracks, and communicating with the engineer. If you walk into a studio with the requirement to do 5 songs in a day or record and mix an entire band in just 3 hours, you're likely to be very disappointed with the result. A simple phone call and you can calculate how many hours you might need and get an idea of the price range it may cost to record a song for yourself or your band. Having as many tangible elements of your song as possible already completed or recorded, having a solid creative direction and an idea of what you want from your study time, and maintaining a productive attitude are probably the most useful things you can do when looking to set aside time in a professional studio.
A good way to start is to book a studio with the engineer and, if you can afford it, with a producer, and see how much you can do. Study time, cost, location, equipment and services offered, and experience are important factors that must be considered when choosing a study. If you have a large budget, you can come to the studio without any preparation and start working on your music from scratch. The good thing about modern recording is that not everything has to be done at once, so often people come to the studio and come back later to take the song to a higher level by adding other services such as vocal tuning, production or mastering or simply spending more time mixing if you had to hurry due to budgetary restrictions.