How does someone know if they have gynecomastia or just is chubby?

Physical Examination. In-person consultation with your family practitioner and/or plastic surgeon is a good place to start. Accurate history and physical examination is important. Eliminating “causes” of gynecomastia is also important. Surgical treatment usually involves partial excision of the glandular tissue plus/minus liposuction surgery. Again, much of what is recommended will depend on specific physical exam.
Firm tissue = gyneco. Being overweight does bring some increase in breast size, but firm tissue diffusely increased in size in a man is the hallmark of gynecomastia.
Visit your doctor. The texture and firmness of male and female breast tissue varies widely. Your doctor can help decide what is normal fat vs true glandular tissue. Regardless, if it bothers a person it can be addressed surgically to eliminate embarrassment and help self esteem issues.
It is breast tissue. When just chubby there is adipose (fat) tissue distributed all over the body, in gynecomastia it breast tissue with normal adipose tissue distribution. On the body like that of a teenage girl breast on a teenage boy.