Yes. In theory you should get some equity that rectifies the lower salary when the startup exits, but that's very risky because many never do.
Maybe you're already aware of this but I'll point it out just in case - many people find building the sort of things startups need in the early stages boring as hell. Most of the work is CRUD stuff and deployment pipelines. There's very little time for the fun bits. You should validate your assumption that a startup would be more interesting to you before making the leap.