Yes, it is advised for both UX designers and graphic designers to have a portfolio to show off your work to potential employers. If you are just starting out, it's less important to have your portfolio hosted on a fancy website, and more critical that you can show that you have the appropriate skills. Hiring managers often want to see that you understand user research, wireframes, user flows, personas, prototypes, customer journey maps, user testing, and analytics tools.
Check out these UX design portfolios for inspiration.