To see what process is making your computer hot, launch Activity Monitor, click the CPU tab, then click the "% CPU" column so that the highest CPU using processes are sorted at the top.
Regarding storage: As George said, the only good long-term solution is to move to an external drive everything whose location is not mandated by OS X, including your Xcode projects and media such as audio, video and photos.
A 1 TB NVMe SSD is about $75 at Costco and elsewhere. In my experience the SanDisk models run cool and don’t slow down after heavy use. SanDisk models larger than 1 TB have a serious bug, but the 1 TB is great. Samsung is a popular alternative.
In the short term, some possibilities:
If you use TimeMachine, delete its snapshots as explained at the EclecticLight.co website under the topic "Freeing space to upgrade to Sonoma".
If you have backed up any iOS devices to your Mac, you can delete the backups per the instructions at Apple Support article HT204215 (forum rules preclude posting the URL).
Freeing disk space by deleting unnecessary system files is discussed from time to time on the "Tidbits Talk" forum, so you might search there.
Of course, you should backup all your data before doing any of this.