Hello,
1. I don't know if two independent projects need to be created or only one Z4_0 priject needs to be created to boot main core0?
You can do it both ways. Easier is to have 2 independent project with 2 linkers.
2. Do you need to configure a boot for each core that requires a boot when configuring the boot header
ID? If not required, does it mean that the enable bit of the core in the boot header can only be activated after the corresponding core is set?
Boot header is just for boot core. In your case it is IO core. This one is booted by default.
You can however boot all cores right out of reset, by modifying the boot header.


But customers do not use direct boot. The better scheme is to boot up with IO core (default) and then when all the safety tasks are prepared start the main core for execution from SW.
See my example SW:
https://community.nxp.com/docs/DOC-329858
3. Is there any way to disable the peripheral core through software configuration after executing the code in BAF?
No. Once core is enabled only reset sequence will put it back into reset.
4.Are there any relevant examples that can help me understand core switching?
the one I have posted + reference manual Chapter 8 Reset and Boot.
Best regards,
Peter