How do I install Xcode if I'm getting this message "Xcode can’t be installed on “Mac HD” because macOS version 10.14.4"? So I'm programming on a MacBook from mid-2010, and I have the most recent update (10.13.6) but when I try to install Xcode it says I need to update again, but it's not listed as an update in the AppStore.
Recent versions of Xcode require macOS 10.14.4 or higher to run. Since you have 10.13.6, you can't run that version of Xcode. With 10.13.6 the most recent version of Xcode you can use is Xcode 10.1.

Also, Macs made in 2010 cannot run macOS 10.14.4, which is why that version of macOS is not available to you as an update. Your Mac can't be updated past macOS 10.13.x.

You can do one of the following:


Stick with Xcode 10.1. You can download it from https://download.developer.apple.com/Developer_Tools/Xcode_10.1/Xcode_10.1.xip (you'll need to log in to your Apple developer account).
Upgrade to a newer Mac that will run macOS 10.14.4. You can find a list of the system requirements at Wikipedia: https://en.wikipedia.org/wiki/MacOS_Mojave