The guide below might be useful for others who want to measure the temperature from the Raspberry Pi hardware.
I got it working on a Raspberry Pi 4 with AlmaLinux release 9.1.
Hardware : BCM2835
Revision : c03115
Model : Raspberry Pi 4 Model B Rev 1.5
Or just do:
cat /sys/class/thermal/thermal_zone0/temp