https://www.biblegateway.com/passage/?search=Matthew+6%3A5-8...

He did not forbid anything there. He simply said not to pray publicly to try to earn points since God would not fall for it.

In Matthew 10:27, he advises people to tell everyone everything he has told them:

https://biblehub.com/matthew/10-27.htm

To be fair, I imagine trying to earn points is not the same thing in his eyes as telling others what he taught them.

To speak more generally and not about you in specific, it would be nice if people interpreting religious texts on the internet would at least take a college class on them like I did. It enables you to avoid some of the more common pitfalls, although it is still possible to make mistakes. I took the time to consult an actual theologian on a number of things when I was younger, which was even more useful than the college class.

That said, even trained theologians will make mistakes on these things. My favorite example is the “vinegar” offered to Jesus on the cross. It was actually a drink called posca, which is basically water sanitized by vinegar with herbs optionally added for additional flavor. When the story was written in Greek, the convention at the time was to call that drink vinegar and everyone understood that drinking vinegar meant drinking water that had a few % vinegar and possible herbs added, yet now many years later when almost nobody does that anymore, most people misunderstand what it means. Even trained theologians will misunderstand that because they are not familiar with ancient Mediterranean dietary habits. They imagine the solider that offered the vinegar as being cruel, when in fact, he was the sole nice guy among the Romans there. It would not be surprising if during Roman persecution of Christians, the act had been used as an example of not all Romans being bad, yet today if you hear about it, it is incorrectly used to demonstrate the cruelty of the Romans.

Interestingly, despite Latin having the word posca, the Latin translation did not properly translate this. The translator had been a huge fan of Greek so much that he used Latin incorrectly in a number of places to mimic Greek grammar and word definitions. He used the word for “and” as a word for also instead of the proper Latin word “quoque”, because the Greek word καὶ could mean either “and” or “also”, and no Latin word meant both at once. Given that he did that, it is no surprise that he also wrote vinegar and expected everyone to apply the Greek interpretation. Then translations of the Latin translation into other languages followed where the translators had no clue that vinegar had been written in place of posca due to an ancient convention. By the time translations were done from the original Greek, Greek had adopted posca as a loanword from Latin and almost nobody remembered the original convention, so the English translations continue to say vinegar despite English never using the word vinegar to refer to vinegar-sanitized water (with optional herbs).

There is a video by a youtube historian that talks about posca in detail and mentions the biblical account:

https://youtu.be/2nBVsW0LtQI

There are other YouTube videos on this, but that is the one where I first learned about this. Also, to make this tangent useful to anyone who has read it to the end, I find that posca actually enhances the flavors in modern Italian food. Note that I used apple vinegar when making my own, which is not the same vinegar people in the ancient Mediterranean likely used, but it was close enough for my purposes. Also, for a laugh, imagine this. In 2000 years, it is possible that people will think making children drink soda was a form of punishment. That is about as close to what children consider soda to be today as most discussion of religious texts on the internet is to what those texts actually say.