How to cite an ebook that has no page numbers
Swap the page number for a part of the book that every copy shares: the chapter, the section, or the paragraph. MLA, APA and Chicago all allow it, and they differ mostly in how the locator is written. The MLA also tells writers not to include device-specific location numbers: a Kindle location or a percentage read is that kind of number, and a reader with a Kobo or a printed copy can't find it. If your ebook does carry stable page numbers taken from a printed edition, cite those instead.
First, check whether the book has real pages
Some ebooks have stable page numbers built in. On the Kindle store they're called Real Page Numbers: the Kindle publishing guidelines ask publishers to map them to a print edition and to give that edition's ISBN, and Kindle devices and apps display them. They can't be previewed on a sideloaded copy and show up only once the book is published, and the book's detail page on the Kindle store says that it has them.
EPUB books do the same with a page list. The EPUB 3.3 specification describes it as links to static page boundaries, which "may correspond to a statically paginated source such as print" or may exist only in the ebook. A book can also name the printed edition behind its pages with a dc:source entry marked as the source of pagination. So a page number in an EPUB isn't always a print page.
The MLA's answer for this case is short: "cite stable page numbers if they are provided". If the numbers move when you change the font size, they aren't stable, and the rest of this page applies. Why ebooks have locations instead of page numbers explains where the moving numbers come from.
MLA
In the works-cited list, the MLA marks an e-book in the Version element, as in its own example:
MLA Handbook. 9th ed., e-book ed., Modern Language Association of America, 2021.
If the content differs between file formats, you can add the format, such as EPUB, at the end. The MLA also says to cite the edition you actually read: if you consulted the digital edition, that's the one that goes in the list, with no hunt for the print pages.
In the text, give the chapter or another division instead of a page. The MLA's answer on citing a note in an e-book says to "indicate the chapter or other division", and its example is (ch. 1, n5). Purdue OWL's summary of MLA in-text citations adds that labels such as chapter are abbreviated (ch.), so a quotation from chapter 15 of Middlemarch is cited as (Eliot, ch. 15).
APA
APA's in-text citation checklist asks that each direct quotation give the author, the year, and the "page number (or alternative)". Without pages, Purdue OWL's APA guide lists the alternatives: a paragraph, a chapter, a section, or a table number, and verse numbers for religious texts. Its example cites a span of paragraphs as (paras. 4-5).
The reference entry rarely needs to mention the ebook at all. Purdue's page on APA electronic sources says there's no need to note it when the content is the same as the printed book. If the ebook is different or abridged, add [eBook edition] after the title.
Chicago
Chicago treats an ebook as its printed counterpart with one addition: a word at the end of the citation that names the format, such as Kindle, PDF or EPUB. Purdue OWL's Chicago guide shows a bibliography entry for Anthony Weston's A Rulebook for Arguments that ends with the single word "Kindle." On page numbers it notes that stable ones "are not always available in electronic formats", and that a chapter, a section, or another easily recognised locator can stand in their place.
Pages that an app works out
Some reading apps fill the gap with a page number of their own. That number is not a page of any printed copy, so a reader with the print book or another app can't find it. Readwyn marks the difference on highlights from a Kobo, and a copied or exported highlight keeps the mark: “p. 142” is a printed page from the book's page list, “~p. 142” is an estimate, and “~37%” is a percentage. If you see the tilde, cite the chapter that the Notebook groups the highlight under instead.