it is better to reach with php filters/actions but not with CSS styles.
As we see you have previously rewritten file of related.php but it is renamed now -> https://prnt.sc/Hc66fShe7tbl . As you see we provided you before the filter to hide out of stock items -> line 21 (which is commented now) and line 172 (which is commented now as well) -> https://prnt.sc/0FxUv1MoMslF . You may renamed your related09162022.php-> related.php and uncomment those lines described above and check then.
The custom function is located in your child-theme/functions.php -> https://prnt.sc/ycfdAbymXzBh