If I had some bitcoins before I got married, and used bitcoins to buy houses, cars, etc.
When the price of Bitcoin went up, I sold Bitcoin. Is this my money my own? Or is it shared by husband and wife?
Unless you explicitly had an agreement mentioning it they will be treated as common property in most counties in the world according to laws nowadays.
Besides, it doesn't matter what form that bitcoin stash of yours will take, even if you sold them for money cars or you simply wasted half of them in a casino, the remaining assets will be split in an agreement. The last question is a bit weird if you sold the coins while married that will be considered joint income, just like earning you make during that period, gain, unless you specifically agreed on this before the marriage. But, there is also a but, ff there won't be a mutual agreement split and your wife will go to court over it the final decision can vary a lot, nobody on the forum will be able to guess the results.
If you continue to invest in Bitcoin after marriage, does it count as two people investing together?
If two people invest together, it should be the husband and wife who jointly own the real estate, right?
In this case, if I invest in Bitcoin after marriage, then Bitcoin will not be considered as an independent property. Is it right?
Yes, yes, and yes!
But seeing the influx of questions and the understandable reticence at giving details such as the country I would advise you to seek a lawyer specialized in this in the town next to yours to avoid rumors and have him explained everything according to the laws in your country.
If you are smart enough you should hide your real possessions from your wife!!
If this is how you're seeing "being smart", then I wonder why would you get married in the first place.
If you only hold Bitcoin and do not share your private key with anyone, then it is yours.
And if your wife and her lawyer find out that you have hidden that from here you might face a perjury charge.