To create a custom 404 page, add a new page with "404" in its URL. Make sure to disable the "Add page to default menu" option so it remains standalone and doesn't appear in the site's main navigation. You can then customize this 404 page just like any other page using the "Pages" module. Once published, your customized version will automatically replace the default 404 error page.
Custom 404 page.