There are some really great resources for affordable licensing and stock free music like Musicbed, Artlist, Jamendo, and Incompetech. Incompetech is completely free, but the others you pay a reasonable amount for a certain number of licences, and access to libraries that you can download.
It’s also worth consulting with a music supervisor to learn more about the process. When you’re building your budget or trying to find what fits within the budget you have - depending on what stage you’re in - go through your network to find a music supervisor or someone who works at a library/licensing company for an informational. Compensate them for their time - I bought dinner when I did this - and use that info to help make your gameplan. But if you are planning to submit to festivals, it’s worth consulting with someone to make sure you do it correctly, otherwise you may not get the right licenses and may be forced to swap out tracks in order to show at a festival.