how to add dynamic text before and after of post title

You should create a child theme and then edit the file where you want the dynamic text to appear. So if you want to show the text on single blog pages, you’ll simply use the single.php file in your child theme.

More on WordPress child themes here: https://developer.wordpress.org/themes/advanced-topics/child-themes/