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"?
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