You have several mthodes to override 403 / 404 System pages.
Method 1. Set 403 / 404 pages.
You can set the 403 /404 page on "Basic site settings" page
Admin -> Configuration -> System -> Basic site settings
Path /admin/config/system/site-information