Hi there Мандзя Богдан Миколайович
Thanks for using QandA platform
start by upgrading the Distributor first, pausing replication, and verifying that agents run smoothly. Next, upgrade one secondary replica, remove it from the AG, update to SQL Server 2022, and rejoin it. Then, failover to the upgraded secondary, update the primary replica, and rejoin it to the AG. Finally, validate replication and AG health, ensuring synchronization and agent functionality before resuming full operations.
If this helps kindly accept the answer thanks much.