How do I get the data size of an instance or the value of a variable (in bytes or bits?)

I can’t figure it out. Please help me. I appreciate all the help I can get.