if no changes are applied to any of the bootloader files, then how does changing settings in Arduino IDE take effect?
Does anyone know where does MiniCore store that bootloader hex file just before uploading it to a board?
Usually "burn bootloader" will select from one of several pre-built .hex files based on the "board" settings, perhaps with different "upload" settings, and/or "fuse" settings. (You could use the same bootloader binary for "16MHz external clock" and "8 MHz internal clock" if you change the fuses and upload speed.)You said "C:\Users\User\AppData\Local\Arduino15\packages\MiniCore\hardware\avr\1.0.3\bootloaders\" - that should be it. You can turn on "verbose" for uploading in the preferences and check the output to be sure.
Arduino IDE does not apply any changes to the bootloader hex files. When you choose your option in the tools menu (MCU, clock frequency) these parameters decide which hex file is uploaded and which fuses is sat. If you want to understand more of what's going on, have a look inside the boards.txt file; that's where all the magic happens. If you want to burn the bootloader without Arduino IDE you can use your ICE together with avrdude.