The Beatitudes are part of the three chapter long 'Sermon on the Mount' in the Gospel of Matthew. The sermon is a collection of the moral teaching of Jesus.
the sermon is not addressed to the crowds. It is directed to the disciples. Jesus is the Rabbi. "He sat down." Rabbi's sat down to teach!
The word 'Blessed' is sometimes translated as 'Happy'. Also note that Jesus does not each in any negative way. There are no "Thou shalt nots." His instructions are fulfilling the Old Law. "I did not come to destroy but to fulfil." All of the Old Law is in the Beatitudes.
By going up the mountain as Moses went up the mountain to receive the Ten Commandments, Jesus is shown as the new Lawgiver. What is this new Law?
"Blessed are the poor in Spirit." The first commandment in the Old Law is to love the Lord our God with all our heart and soul and mind. Poverty in Spirit is to have no material thing more important than the Lord. The Spiritual is more important than the material. God is more important than our family or our wealth or anything else. This will be further explained with the verse: "Seek first the kingdom of God and his justice and all these things will be added."
A good paraphrase of the verse could be: If you want to be happy, put God absolutely first. The kingdom of heaven is already yours.
I repeat. This message was to those who came up the mountain to be taught by Jesus. It is not my job to explain the message. It is the evangelist's job to get people to leave the crowd and come up the mountain!! Jesus is the teacher.
We can never be totally poor in Spirit in this world. But we can aim to be. We will be poor in Spirit in eternity. The Beatitudes are not commandments. They are ideals of happiness promised by Jesus to disciples. We will reach them in heaven. In the meantime, we can be canonised for trying.