We are young men in the diwaniya and the mosque is near us and we hear the adhan. Is it allowed for us to pray in the diwaniya?
The prayer is valid, but what you are doing is wrong.
The basic rule is that Allah, the Blessed and Exalted, says: Only those who believe in Allah and the Last Day maintain the mosques of Allah.
And the Prophet ﷺ was approached by a blind man asking his permission.
He said: O Salih, do you find an excuse for me? I am blind and I do not find anyone to accompany me to the mosque. He said: Do you hear the call?
He said yes. He said: Then respond. Praise be to Allah, your Lord, for health and well-being, and the mosque is near.
And the government allows it, but in some countries the government does not allow you to go to the mosque to pray.
You arrive at a certain mosque, and they call you, asking what you are doing here.
We pray several prayers in the mosque, and you are able to. Praise your Lord, we are in a blessing. Instead of thanking Allah for this great blessing we have and the abundance of mosques,
and it is easy for everyone to go to the mosque and pray. Before, you wanted to avoid prayer in the mosque for what reason? You sit in the gathering place for four or five hours, do you pray there? What do you know.
Go out, pray, and come back. Rely on Allah the Blessed and Exalted in this matter.