The script below determines the Linux distribution based on the /etc/os-release file. Using an if statement block, the appropriate command for that distribution is set and, finally, executed.

#!/usr/bin/env bash

me=$(cat /etc/os-release |grep -m 1 NAME | sed -E 's/^NAME=(.+)$/\1/')

if [[ $me == '"Void"' ]]; then
  upd='sudo xbps-install -Su'
elif [[ $me == 'ArcoLinux' ]]; then
  upd='sudo pacman -Suuy'
fi

$upd

In your shell rc file simply assign an alias to the bash script above. Since I have laptops with VOID Linux and Arco Linux, it works well.