How do I merge 2 WordPress Themes?

Depending on the quality of the theme (as anyone can write buggy stupid code), replacing a theme should not impact your content, and it should be displayed as it was in your current theme.

That assumes you are not using one of those super mega “everything including the sink is included” themes, or at least not use their specific functionality (page builder, specific shortcodes, sliders, etc) in which case you are most likely out of luck and you will need to “redo” those parts in the new theme.

error code: 523