The simplest is to use the graph card and that’s it.
If you want to retain data for a longer time frame then look into influxDB and Grafana:
https://community.home-assistant.io/t/complete-guide-on-setting-up-grafana-influxdb-with-home-assistant-using-official-docker-images/42860