The iPhone is correct. You don't have enough memory.
That is likely why iTunes is reporting that your iOS 18 version is up to date. iOS 27.2 is not even being offered since it cannot be installed.
By the way, iTunes is long out of date unless you are using a very old PC. Suggest that you update to the current version of Apple Devices, available from Microsoft.
https://apps.microsoft.com/detail/9np83lwlpz9k?hl=en-US&gl=US
Updating iOS via a computer might save a bit of required space on the iPhone, but there are no guarantees.
The bottom line......you are going to need to delete a lot data from your iPhone if you want to try to install iOS 27. I would not consider trying to update unless you have at least 20 GB of free space on the iPhone.