I found running Classic D&D I could just hand out an amount of XP at the end of the session that felt right and that fitted roughly with the game's guidance of ca 5 sessions to level. I didn't need to do any calculating, just decide "This was a small/medium/big session" - and it seems to have all the positive benefits that use of XP gives over milestone/ad hoc levelling. Players get to write it down. They see how close they are to next level. They see a connection between achievement & reward.
This works equally well in 5e; the DMG even provides a handy table. Just hand out eg 1/5 or 2/5 the XP-to-Level for a typical session, then adjust up and down. Or go to a flat 20 XP to level and then give out 3, 5, 7 etc XP per typical session. 20 is a good number because you can give 1 XP per minor achievement & 2 XP per major achievement across the session, 1 XP per hour played, etc.