Hello,
This example was using a custom page template, apparently not your case.
For a “regular” page title, just find out what your theme use as a title (H1, H2 or H3 in general – you can right click on the title text with Google Chrome or Firefox > Inspect to find out that).
Then with that knowledge at hand, edit the right CSS file for your theme or child template css file.
For my WP blog one title look like that:
<h1 class="entry-title"><a href="https://blog.digico.fr/design-webdesign/list-of-smartphones-and-devices-size-for-responsive-design/" rel="bookmark">List of smartphones and devices size for responsive design</a></h1>
So, if I want to fully center all page titles I need to change or edit that h1 style definition in style.css file (for a child theme it should be in parent theme location, something like themes/nameoftheme/style.css):
h1 {many text then add... text-align: center;}
Finally rewrite / upload on webserver the needed CSS file.
If you’re not familiar with the process, just keep in mind any css rule is ended by a “;” character even in same line, for example (font-size: 30px; text-align: center;) Spaces are not important, I just put spaces for more readable stuff. Again you can try to use Code Inspectors in Browser to test and see if it works as a preview.
If you want more customization, you might need to create post and / or page templates later.