24 seconds is indeed longer than it really needs to be to run this small circuit. The reason it is taking 24 seconds is because you are using a construct called Qiskit primitives; specifically you are using the sampler primitive. The reason this detail is important is because by default these primitives will use some parameter choices to compute, in this case, quasi probability distributions. So, unless you specifically set the number of shots, the program will set some number of shots (likely in the thousands, but I do not know the exact number). Additionally, by default some type of classical error mitigation post processing will be applied (by default it is a measurement error mitigation procedure), which will consume more quantum compute time.
To answer your question, given you are using a sampler primitive, I think this amount of compute time is expected. The 27 qubit devices do use more compute time, usually, than the smaller devices, but if you run the sampler primitive on the smaller qubit devices you will still get roughly the same QPU time usage.
Here is a code snippet to run on an IBM quantum backend directly, with no Qiskit runtime primitives (this will give you a lower level of control to adjust the number of shots, and therefore compute time):
from qiskit_ibm_provider import IBMProvider
provider = IBMProvider()
hgp = f"{hub}/{group}/{project}"
backend = provider.get_backend("ibm_hanoi", instance=hgp)
job = backend.run(circuit, shots=100)
print(job.job_id())