Premium/ultimate applies to all project members within the project?

If I buy premium or ultimate, I can use the advanced features of gitlab. But will other users in my projects and project groups be able to use them?
For example, can other users create epic if only I have premium? I am the owner of the project.

If you buy premium for one user, then it is for one user in the project that it was purchased for. If you want other users to have premium features, then they also need to purchase.

If a user with a premium will create an Epic. Other users without premium will be able to leave comments in this Epic? Will they be able to edit the Epic?

No. Epic is premium so ALL users who want to manage epics create edit or whatever NEED premium.