Remember, WordPress can not replace PHP. For an update in PHP version must contact hosting support or change the server or hosting service provider.
Sometimes an old WP theme or plugin is no longer supported and a new PHP might cause problems but this is rare.
WordPress.org recommends at least PHP 7.4. You may see a warning message in your WordPress dashboard asking you to upgrade PHP if it still uses a version lower than 7.4.