Update all WordPress posts’s title and content then display them in a table

For a process this large you are probably running up against timeout errors. You can either set your server’s timeout to a very, very large number (not recommended) or use a different process to achieve these results.

Take a look at writing a command using WP CLI or adding a scheduled task to allow the server to run these in the background.

You may have to handle which posts have already been updated and skip those if this process needs to occur more than once.

Best of luck!