I mean, they teach entire courses on exactly this. I'd suggest getting a book, following some tutorials, or doing a free Coursera course.
This one is a good start. You can audit for free if you'd rather not pay for it:
https://www.coursera.org/learn/database-design-postgresql