HI guys, I’d like to say that this is working now. the problem was that in this line
return prefix_insert_after_paragraph( $inserted_hook, 7, $content );
Where there is 7, it was placing the box right after the box from the 3rd paragraph for some reason. I just had to change as the example below and the content was placed in the right place.
return prefix_insert_after_paragraph( $inserted_hook, 10, $content );
Thank you all 🙂