Dashboard Card for Time and Date

If you install HACS, you can see a few clock cards there
Else indeed via a yaml-type approach, example
Simple Lovelace Date card - Configuration / Frontend - Home Assistant Community (home-assistant.io)