I want the “next” and “previous” buttons to appear in my custom navigation function

The _e function immediately echoes the translated content to the output queue, so the string will end up in the html early. If you simply want to retrieve the translated content to add it to a string you need __.