Occasionally, you may encounter a 404 error on your website. A 404 error means that the web server, Apache by default on cPanel servers, can not find the requested file. The error could happen for several reasons, from the file not actually existing in the specified path, or it could be due to invalid rewrite rules. A lot of sites running WordPress may encounter this error due to missing rewrite rules. This can be corrected by simply adding the rules found on https://wordpress.org/support/article/htaccess/ to the .htaccess file in the document root of the domain in question.
For domains not running WordPress, you need to ensure that the file exists in the path you are accessing. If a domain (domain.tld in this example) has a document root of /home/user/public_html and you are getting a 404 when accessing domain.tld/images/monster_truck.jpg, the file must exist at /home/user/public_html/images/monster_truck.jpg.
The error can also happen when a user has a typo in the URL.