Roblox removed the headshot-thumbnail endpoint (I don’t know why), so now you’ll have to get the Roblox CDN URL indirectly from the REST API.
To get the headshot, you can use this URL: https://thumbnails.roblox.com/v1/users/avatar-headshot?userIds={USERID}&size={SIZE}x{SIZE}&format=Png&isCircular=false&thumbnailType=HeadShot
where you’re able to parse imageUrl for the CDN URL.
If you want the full body snapshot, you can use https://thumbnails.roblox.com/v1/users/avatar?userIds={USERID}&size={SIZE}x{SIZE}&format=Png&isCircular=false&thumbnailType=HeadShot