ACH transfers are not same day by default, and definitely not near-instant. However some of the consumer visible services offer immediate delivery, while still using normal "slow" ACH in the backend. Typically this is done via another network that verifies that the funds are available, and that the ACH transaction has been submitted. If both are verified, the receiving institution can be fairly confident they will get the money, and will make it available immediately.
For more immediate and irrevocable transfers, wire transfers are used. The Fedwire system for example, allows banks to directly transfer funds from their Federal Reserve deposits to each other. The sending bank ensures that the sender has the available money and debits it, while the receiver bank gets notice from the federal reserve that the transfer is complete and credits the receiver account. Obviously the banks can also use this system to directly settle any debt that they owe to the other bank, since federal reserve balances are legally equivalent to cash in the vault.
The US does not have any system quite like the UK's faster payments system. In the US there is basically an unwritten rule that no consumer should ever actually see the account number of a company or other consumer except when printed on a physical paper check.
So the closest we've gotten to the faster payments system is the Zelle payment network, which unlike Paypal or Venmo is a service offer directly by the bank, but abstracts away account numbers by using phone number or email addresses. Zelle does offer immediate settlement from the consumer's perspective. This system is far from universally implemented right now, and still only works for consumer to consumer payments.
For bank's billpay services, they end up using ACH if they have an agreement with the biller, or otherwise create and mail a physical paper check!
Basically the US payments systems are still stuck back in the 1990s.