In general, the government can limit what a business can do. That power is not unlimited, though, so the government's freedom to regulate is limited by constitutional rights, such as guaranteed by the First Amendment. If a government action limits a constitutional right, that action is subject to "strict scrutiny" under judicial review. The action must be justified by a compelling government interest, it must be narrowly tailored to meet that interest, and it must be the least restrictive way of meeting that interest.
In the earlier decision by SCOTUS, Masterpiece won a details-specific victory based on the finding that the Civil Rights Commission was hostile to the religious interest of the baker, so the larger issue of whether there has to be a First Amendment based exception to such discrimination laws has not been decided. In the more recent ruling, we could assume that the commission took heed of the lesson of the earlier case and applied the rule in a more neutral fashion. The court did hold that
The laws and the Constitution can, and in some instances must,
protect gay persons and gay couples in the exercise of
their civil rights, but religious and philosophical objections to
gay marriage are protected views and in so me instances protected
forms of expression... While it is unexceptional that Colorado law
can protect gay persons in acquiring products and services on the
same terms and conditions as are offered to other members
of the public, the law must be applied in a manner that is
neutral toward religion
It is possible that SCOTUS will rule that there is indeed a religious exception to discrimination laws, but that is a matter for the future. The point is, the state has a compelling interest in preventing discrimination, and some such laws might pass strict scrutiny, so government actions like this may or may not be constitutional.
Twitter banned Alex Jones: Twitter is a private entity, not a government. Its actions are not subject to strict scrutiny, and unless a private action is prohibited by law, there is appeal to the First Amendment. That is, the First Amendment does not guarantee a right to a platform, it just guarantees a lack of government action once you have a platform. There might be considerations of discrimination law, if for example a person is banned for their religion or race. It is important to recognize, however, that there is no blanket ban on all forms of discrimination (deciding which store to shop at is a form of discrimination). In this instance, the gentleman was not discriminated against on the basis of some protected category – generally. In Seattle, political viewpoint is a protected category, but this only covers employment, housing, contracting with the city, and public accommodation. Moreover, Twitter alleges that the ban was based on specific prohibited behavior, not political ideology.