Sometime we need to change related product number In WooCommerce single product page. So if you want to change the number of related products at single product page then you can do it easily to add below code snippet.
PHP Snippet: Change Number of related products
Where to add custom code?
By the way, you can add this code snippet at your child theme functions.php file or you can use any third-party plugin like this( https://wordpress.org/plugins/code-snippets/ ).
After adding those code as snippet on your site you will see that, 5 related product will display at the buttom of the single product page. Check below screenshots

So you can easily change your related products number as you want.
That’s All.