A lot will depend on the billing cycles. Normally the balance on the account is reported to the Credit Bureaus on the day the bill is generated.
Giving two examples. In both cases you are transferring $4,000 balance from Card 1 (current balance $4,500, new balance $500) to Card 2 (current balance $1,000, new balance$5,000). Card 1 has a billing date on the 10th of the month, card 2 has a billing date on the 20th of the month.
Method one - good - do the transfer after the 20th and before the 10th. Old balance is reported as $4,500 + $1,000, total $5,500. New balance reported as $500 + $5,000, total $5,500. No changes in total or utilization.
Method two - bad - do the transfer after the 10th and before the 20th. new balance, for one month only, is reported as $4,500 + $5,000 total $9,500 which jumps utilization up by $4,000 and lowers score. And it will take several months for the score to go up again.