Installation fails with lot of errorsin the log and can't connect to ppa.launchpadcontent.net

You are not doing anything wrong. The problem is with ppa.launchpad.net. Ubuntu/Canonical has been under attack since April 30, and ppa.launchpad.net has been working erratically. Try again later, or consider using Debian 12 instead of Ubuntu 24.04.