Games are made with various tools so it depends on the game and whether the tools are available for it.
The basic process is :
1. extract the resources
2. identify the audio file
3. prepare and replace the audio file
4. repack the resources
5. install and test the game.
There are some dedicated tools for extracting the game resources.
https://github.com/Myster-Tee/NxFileViewer
With Ryujinx you can also easily do that.
https://www.vg-resource.com/thread-37204.html
That said, there are many tools that developers use to make games, ranging from homemade tools to game development platforms like the Unreal SDK.
Sometimes they might actually use mp3s but in many cases they convert the audio to their own format.
Sometimes they just rename the mp3 file, sometimes it's a known format with fixed parameters (like 128KB/s stereo with a certain codec) and sometimes it a proprietary file format,
This might be the biggest challenge you will be facing.
If you know the platform, then try to find a similar popular game that other people have been hacking.
They might be able to provide details on which tools to use.