That TWAIN message usually means NAPS2 cannot see a TWAIN driver for the printer, not that the scanner is broken. HP's Windows driver for this model normally exposes the scanner through WIA instead, so try this:
In NAPS2, create a new profile and choose WIA rather than TWAIN as the driver, then pick the OfficeJet Pro 8138e from the device list. If it appears under WIA, scanning should work straight away.
As a quick test, also try the built-in Windows Scan app. If that sees the scanner, the driver is fine and it is just a NAPS2/TWAIN issue.
For the driver itself, on HP Support search for the series name "OfficeJet Pro 8130e" rather than the exact 8138e model - HP lists the downloads under the series - and look for HP Easy Start or the full software package there. You can also check Settings > Windows Update > Advanced options > Optional updates, as Windows often offers the HP driver there.
One more thing: if the printer is connected over Wi-Fi, try a USB cable for the scan test. TWAIN over a network connection is often the part that fails, while WIA over USB usually works.