How to organize functions.php content

As @Tom J Nowell says, don’t nest functions. Just write them normally:

function my_theme_prefix_setup() {
    // Add theme support etc.
}

add_action( 'after_setup_theme', 'my_theme_prefix_setup' );

function my_theme_prefix_init() {
    // Register a post type
}

add_action( 'init', 'my_theme_prefix_init' );

Or using a class:

class my_theme {
    function __construct() {
        add_action( 'after_setup_theme', array( $this, 'setup' ) );
        add_action( 'init',              array( $this, 'init' ) );
    }

    function setup() {

    }

    function init() {

    }
}

$my_theme = new my_theme;

Or using a “static” class (no instantiation) – since the class pattern in themes/plugins is often a glorified namespace, use them as such:

class my_theme {
    static function run() {
        add_action( 'after_setup_theme', array( __class__, 'setup' ) );
        add_action( 'init',              array( __class__, 'init' ) );
    }

    static function setup() {

    }

    static function init() {

    }
}

my_theme::run();

Then there’s namespaces. So long as you’re running PHP >= 5.3 (which you should be, though as @Nicholas mentions, you can’t rely on for public themes – WordPress minimum requirements are only 5.2.4), this is the real solution that the above classes are attempting to resolve.

That said, there is no one right technique. Pick whichever suits the job, and that you’re comfortable with. So long as you keep it clear, consistent and maintainable, you’re doing it right.