CodeBreaker/ActionReplay/GameShark/whatever style codes work by modifying data that exists in memory while the game is actually running and being executed on the console hardware itself. In other words, the code will say, "Okay game, I see that you store player 1's health value at memory address 0xWHATEVER, but here's the new value you should use to overwrite that". That's just one example.
There also exist codes that are "conditional" which read some value(s) from the console's memory, do a comparison (e.g. "Is the value less than 5?") and then apply additional modifications as needed. There are other types of codes, too, but that's a lot to get into for this post.
Long story short, the only way (to my knowledge) to turn a CodeBreaker-style code into a patch is to use a debugger (either with hardware or with an emulator) to trace where that value is being stored/calculated and then written to memory, and then use a disassembler, such as Ghidra, to identify and then modify the assembly function(s) responsible for storing/calculating and writing that data.
The other alternative would be to modify a game to use a built-in trainer, as was done with a great number of the early "scene" releases by groups like Echelon and Kalisto. I'm sure you're familiar with those, but in case you aren't, here's a video example:
https://www.youtube.com/watch?v=YLpxiYssHHY&t=41s