You cannot install 24.04 because you do not have any disk space free. As far as I can see sda is made up of one partition or type 'SFS' which is a Windows type partition - see: -
https://askubuntu.com/questions/412248/mounting-an-sfs-partition-drive
"...sda is the harddrive on which i want to install ubuntu. sda has 3 partitions: F, G and one unallocated for ubuntu. None of them are showing up..."
I read this as its a 0.5T disk with one 0.5T 'SFS' partition. I think the F & G and the unallocated space are inside this dynamic partition. So you seemed to have installed 22.04 within one of these? How that is done is beyond my knowledge and I don't think the installer can cater for this.
What are you using to partition the disk? The Ubuntu install media does come (if memory serves) with gparted which would allow you to adjust the 'SFS' partition and either leave the rest unformatted (which the installer can use to install on) or add a ext4 partition to install 24.04. (You would probably have to instruct the installer to use it with a manual install) I have never messed with a 'SFS' partition so I don't even know if it can be adjusted. (Probably best not to just delete it.)
https://askubuntu.com/questions/41667/how-is-sfs-partition-different-than-other
USE OF PARTITION TOOLS IS AT YOU OWN RISK. MAKE SURE EVERYTHING IS BACKED UP BEFORE YOU ATTEMPT ANYTHING.
I have a notion that when you removed 22.04 from the Windows partitioner(?), Windows, thinking it knows best, converted sda from NTFS to SFS and that from what I have read this is not really reversible.
Scrub around the rest of what I have written below and read the following (sorry I wasted your time): -
https://askubuntu.com/questions/482768/changing-windows-dynamic-disk-partition-to-basic-partition-and-not-the-full-drive
Ignore below
The following is a high risk strategy and you would embark on it at your own risk.
Boot to Windows and go to the partitioner. Leave F & G alone but remove what what you allocated for 24.04. Finally make a note of the size of F & G -the full partition spaces, not just the data storage size. Then exit Windows.
Boot into the 24.04 installer. Select the test and not the install option. Run a terminal and run the partitioner.
sudo gparted
This is run with elevated privileges (that is what the sudo bit does) but I don't think it will ask for a password - it is automatic with this version. That will run the graphics partitioner.
The top right allows you to switch between you disks. Select sda. (Leave sdb well alone.)
I assume it is showing the full sda disk with one SFS partition. Select that partition by clicking on it. Then select the menu option Partition->Resize/move. Adjust the partition to make room to install the new OS. It will show as unallocated. Don't make the existing partition smaller than F & G combined so that Windows can still fit both of these in. (If the partitioner reports all data will be lost if you proceed you probably should abandon the process for obvious reasons.) It is possible this data will be lost anyway so think what the consequences of that might be.)
If all that goes well then you are in a position to resize this partition. This is the point of no return. You have to press the green tick and let it do this operation. Good luck.
You should have ended up with a smaller SFS partition and some free space. You can then exit the partitioner.
You could now either check what damage you have done to your Windows installation (hopefully none) or proceed directly by running the 24.04 installer. You want the installer to install in the free space but I can't remember exactly the sequence from here. Personally I would install manually but that is just me.
https://ubuntuhandbook.org/index.php/2024/04/install-ubuntu-24-04-desktop/
Interesting: If you read the above it does indicate an inbuilt partitioner. I would strongly recommend taking the interactive route so you can check how it progress at each stage. Be very careful and read everything.
You shouldn't need to convert MBR to GPT (see comments) which would just add a further complication. So long as you have GPT disk with a UEFI partition (which you have) further disks will work mix-n-match. (I have a combination on both my machines. Ideally, starting from scratch you would probably elect to use GPT for all.
fdisk would trash all data but gdisk will convert a MBR to GPT and preserve data. (I have done this on both my machines.)
Good luck if you have decided to proceed.