Copy and paste the following AppleScript into the Script Editor, click the hammer icon to compile it, and then click run. It will pop a dialog with an HTTP response code and its associated message about that response code. Tested: macOS 11.6.8 with Ruby 2.6.3 and 3.1.2.
use scripting additions
-- change to the address of the site that you want a status response
set uri to "https://www.apple.com"
set {rcode, rmessage} to paragraphs of my site_status(uri)
display dialog "Site Status code: " & rcode & return & "Site status mesg: " & rmessage with title "Website status"
return
on site_status(auri)
return (do shell script "/usr/bin/ruby <<'EOF' - " & auri's quoted form & "
require 'net/http'
res = Net::HTTP.get_response(URI(ARGV.first))
puts res.code, res.message
EOF")
end site_status

List of HTTP Status Codes.