You need to use ‘the_content‘ filter
function add_before_content($content) {
return 'Before content area '.$content;
}
add_filter('the_content', add_before_content);
It will still be inside the content div. If you want it outside the div you have to edit related template files i.e. single.php or templates/content-single.php. It all depends on which pages you want to apply it.