This depends on who you talk to and the type of publication you are looking at. Generally, it is accepted as a viable option to get your work published, although some people may look down on it.
In the literary world, some people may believe that self-publishing means you can't get your book accepted by a traditional publishing house. This isn't always the case though and may be an outdated opinion. Many successful authors have self-published their books before they got picked up by a publishing house.
In academia, some people may view self-publication as less legitimate than a scholarly journal or book published through an established publisher. Academic publications still generally require peer review and rigorous standards before something can be published. However, some scholars may accept self-publication as a way to get around the high costs of submitting to a journal or traditional publisher.
Ultimately, it is up to each individual to decide what they think about self-publishing. If you're considering it as an option, there are some good resources online to help you decide what's right for you and your work. The following articles provide more details on self-publishing:
• https://www.thebalancecareers.com/the-pros-and-cons-of-self-publishing-a-book-4157676
• https://www.thecreativepenn.com/self-publishing/
• https://www.forbes.com/sites/jeanfolger/2018/01/20/considering-self-publishing-your-book-ask-these-34-questions-first/#680be2a64cbe