All your content is stored on the database so if you switch themes your content will remain.
Have in mind that sometimes the structure of content among the themes is not the same an depend on each theme shortcodes and theme builders, so things can get complicated.
Would you mind to explain in more details what you have in mind so we can provide you better advice?