uploads – How do I update attachment urls after changing site domain

I recently moved my site from https://subdomain.example.com to https://example.com.

Now all my attachments still point to
https://subdomain.example.com/wp-content/uploads/2021/04/file.mp3

even though now “live” at
https://example.com/wp-content/uploads/2021/04/file.mp3

Is there some way to globally update all attachment urls?