You can override Apache’s default 404 page by adding ErrorDocument 404 /custom404.html to your .htaccess or Apache config. Just make sure the file exists and paths are correct.
ErrorDocument 404 /custom404.html
.htaccess