As-Salaam alaikum,
In Hadith No. 76 (Sunan Tirmidhi), it was related on the authority of Nawwas Ibn Sam'an, may Allah be pleased with him, that the Messenger of Allah, Sallallahu alaihi Wasallam, said:--

"Allah has set forth the following as a parable: there is a road that leads straight
to the destination. On either side of the road there is a wall in which there are open
doors, with curtains hanging on them. From the remote end of the wall, a voice
calls, 'proceed straight and do not turn aside'. Whenever someone intends to lift
a curtain from the door another voice calls from above, 'Beware! Do not lift the
curtain; otherwise you will be lured inside.'

The Prophet, Sallallahu alaihi Wasallam, explained the parable by saying that the walls are the LIMITS
imposed by Allah Ta'ala (in the Shari'a), the open doors are the THINGS that He has prohibited, the voice
which calls from the end of the road is the QUR'AN and the voice which calls from above is ALLAH's
MONITOR in the heart of every believer."