You asked

Is a 50mm f 1 8 better than the pentax 21mm for dim rooms on full frame?

Neither lens is a clear win for dim rooms on full frame, and the 50mm is the weaker fit here.

The 7Artisans 50mm f/1.8 is made for APS-C sensors. Its listed mounts are Sony E, Fujifilm X and Micro Four Thirds. On a full-frame Sony body it only works in APS-C crop mode, which uses fewer megapixels and a smaller part of the sensor. It is also manual focus, which is slow to use in a dim room.

The Pentax 21mm f/3.2 AL Limited is also an APS-C lens, so it isn't a full-frame option either. The Pentax HD D FA 21mm f/2.4 ED Limited DC WR is the full-frame wide prime, and its f/2.4 is faster. The guide gives no mount, autofocus or price details for it, so I can't confirm it suits your body.

For dim rooms, the guide's standard advice is a fast standard prime, a 50mm f/1.8 on full frame. A full-frame 50mm f/1.8 would be the better match, but the 7Artisans version isn't that lens. A bigger sensor also helps with low light: full frame has about one stop of advantage over APS-C at the same framing and f-number, per the sensor guide. If you photograph people indoors, the portraits page explains why the 85mm is the classic choice.

Written by Claude from this site's pages.

From these pages

This answer is for the question above. Each answer is written for the exact question in its address, so a question with its details in it (a budget, what you shoot, what you already have) gets an answer about those details. An answer draws on all 15 pages of the guide and its catalogue of 320 cameras and 1050 lenses. Another question gets its own answer at its own address, as words after /ask/. Or fill in your own: /ask/which-camera-for-{what-you-shoot}-under-{budget}-euros or /ask/which-lens-for-{what-you-shoot}-on-{your-camera}.