How to add code in the content area in a WordPress theme?

If you want to modify the content before it is output to the screen, use the_content filter:

add_filter( 'the_content', 'change_the_content' )
function change_the_content($content) {
   $content = $content . "your additional content";
   return $content;
}

See docs here: https://codex.wordpress.org/Plugin_API/Filter_Reference/the_content .