Welcome.
You'll have to work through it in several steps, first manually then in a more automated fashion. You'll probably want to make a separate key for this activity, then add
command="sudo something in the public key which you've placed in
authorized_keys on the server. For that, see the manual page for sshd in the section on "authorized_keys file format"
When that works manually, modify
/etc/sudoers so that the command with its specific parameters (and only those parameters) can be run with no password. For that see the manual page for sudoers
And if you need more background, ask here. But also spend the time to go through the book
sudo Mastery by Michael W Lucas or else his presentation:
The idea is to use
sudo with the least amount of privilege possible to get the job done.