`error.tsx` is a route-segment error boundary UI for runtime errors and can show a fallback with a reset action. `not-found.tsx` is rendered when you call `notFound()` or a route can’t be resolved, to show a 404-like page for that segment.