Leetcode 17 : Letter Combinations of a Phone Number
Make mappings static constexpr
This mapping should never be changed, so ideally it should be constexpr. You also need only one instance of it, so it should be marked static as well (also, constexpr requires this). So:
static constexpr std::array&lt;const std::string_view, 10&gt; mappings = {
    ...
};

This also means getLetterMappings() can be made static constexpr, and in fact you can make dfs() static constexpr as well, although the constexpr part doesn't do much there.
Redundant check for empty input
Why do you check both digits.empty() and digits.size() == 0? Those expressions are equivalent. I would just check for digits.empty().
Unnecessary parameters curr_idx and N
Since you are passing the input digits to dfs() as a std::string_view by value, you don't need the parameters curr_idx and N. Just pass a modified version of digits to recursive calls to dfs(), like so:
void dfs(std::vector&lt;std::string&gt; &amp;combinations, std::string_view digits, std::string &amp;s) {
    if (digits.empty()) {
        combinations.push_back(s);
        return;
    }

    auto letters = getLettersMapping(digits.front());

    for (const auto &amp;ch : letters) {
        s.push_back(ch);
        dfs(combinations, digits.substr(1), s);
        s.pop_back();
    }
}