Charles has begun his first visit to Wales as King, attending a service of prayer and reflection for the life of the Queen.