The existence of right-handed neutrinos with Majorana masses below the electroweak scale could help address the origins of neutrino masses, the matter-antimatter asymmetry, and dark matter. In this paper, leptonic decays of W bosons from 140 fb(-1) of 13 TeV proton-proton collisions at the LHC, reconstructed in the ATLAS experiment, are used to search for heavy neutral leptons produced through their mixing with muon or electron neutrinos in a scenario with lepton number violation. The search is conducted using prompt leptonic decay signatures. The considered final states require two same-charge leptons or three leptons, while vetoing three-lepton same-flavour topologies. No significant excess over the expected Standard Model backgrounds is found, leading to constraints on the heavy neutral lepton's mixing with muon and electron neutrinos for heavy-neutral-lepton masses. The analysis excludes vertical bar U-e vertical bar(2) values above 8x10(-5) and vertical bar U-mu vertical bar(2) values above 5.0x10(-5) in the full mass range of 8-65 GeV. The strongest constraints are placed on heavy-neutral-lepton masses in the range 15-30 GeV of vertical bar U-e vertical bar(2) < 1.1 x 10(-5) and vertical bar U-mu vertical bar(2) < 5 x 10(-6).