If I give $1 million dollars to my children in cash, does the gift tax apply? How would the IRS even know about it?

If you give gifts totaling more than 16000$ in 2022 to anyone except your spouse, yes, gift tax would apply. In theory, if you pay cash, the IRS won't find out at first, but whenever your child intended to spend that money, the IRS will be notified as the source of money is unknown.