What is the last value in a cipher suite? I understand that a cipher suite should contain the MAC algorithm at the end.

So ECDHE-RSA-AES128-SHA256 should use SHA256 in HMAC for the MAC.

But what about the PRF? From the RFC this is what I understand: new cipher suites need to include the PRF at the end. The only "new" cipher suites I can think of is AES-GCM: ECDHE-ECDSA-AES128-GCM-SHA256 and here if I understand correctly, since no MAC is used SHA256 refers to the PRF p_SHA256?

I'm confused
HMAC is the underlying primitive used to construct the PRF. The cryptographic hash is used to construct the HMAC.

It is (at least) used to derive the session keys. The only thing that changes is that records that transport the data do not rely on the HMAC function anymore.

The PRF (and therefore the underlying HMAC) has one configuration parameter: the underlying hash function. This is what is specified at the end of the ciphersuite.