Transit without visa at DMK airport is only possible when both flight segments are on Thai AirAsia or Thai AirAsia X and booked on the same ticket. If you are on any other carrier, or on separate tickets, you must clear immigration and have a visa.
Indian citizens can get a visa on arrival if there is at least 30 days validity on your passport. You can also obtain an e-visa in advance. Because you have to pay in cash for the visa on arrival, you may find it more convenient to obtain the e-visa in advance.
Timatic, the database which airlines use to verify passenger travel documents, says in relevant parts:
TWOV (Transit Without Visa):
Visa required, except for Passengers
transiting through Bangkok (DMK) arriving on Thai AirAsia (FD) or Thai
AirAsia X (XJ) with a confirmed onward ticket for a flight on Thai
AirAsia (FD) or Thai AirAsia X (XJ) to a third country within 12
hours. The connecting flight must be booked on the same ticket. They
must stay in the international transit area of the airport and have
documents required for the next destination.
- This TWOV facility does not apply to passengers traveling on Angkor Air (K6), Beijing Capital Airlines (JD), Business Air (8B),
Cebu Pacific (5J), Eaststar Jet (ZE), Golden Myanmar Airlines (Y5),
Indigo (6E), Jeju Air (7C), Jet Asia Airways (JF), Jetstar (JQ),
Jetstar Pacific (BL), Jin Air (LJ), JuneYao Airlines (HO), Lao
Central Airlines (LF), Mandara Airlines (RI), Norwegian Air (DY),
Okay Airways (BK), Orient Thai Airlines (OX), Regent Air (RX),
Scoot (TR), Shandong Airlines (SC), Shanghai Airlines (FM),
Shenzhen Airlines (ZH), Siberia Airlines (S7), Sichuan Airlines
(3U), South East Asian Airlines (DG), Spice Jet (SG), Thai Smile
Airlines (WE), Tianjin Airlines (GS), Trans Aero (UN), Turkmenistan
Airlines (T5), T'way Airlines (TW), Ural Airlines (U6) and VietJet
Air (VJ).
While Thai Lion Air (SL) is not listed, TWOV also does not apply, as it is also a low cost carrier and has no transit desk. So you need a visa.
Visa requirements for entry from Timatic:
Passport required.
- Passports and other documents accepted for entry must be valid for a minimum of 6 months from the arrival date.
- When applying for a visa on arrival, normal passports issued to nationals of India must be valid for a minimum of 30 days from the
arrival date.
Visa Issuance:
E-visas can be obtained before departure at www.eVisaThailand.com. Passengers must have a printed e-visa
confirmation.
Nationals of Bhutan, India and Romania with a normal passport traveling as tourists can obtain a visa on arrival at Bangkok (BKK
and DMK), Chiang Mai (CNX), Chiang Rai (CEI), Hat Yai (HDY), Krabi
(KBV), Phuket (HKT), Samui Int'l (USM), Sukhothai Int'l (THS), Surat
Thani (URT) and Utapao (UTP) for a maximum stay of 15 days. They
must have a confirmed return/onward ticket with a departure within
15 days from arrival date, a proof of accommodation, 1 recent
passport photo and at least THB 10,000.- per person (or THB 20,000.-
per family). Their passport must contain at least 1 unused visa page
and the visa fee must be paid in cash only and in THB.
As for separate tickets, I am not that familiar with DMK, but I wouldn't even think of booking separate tickets without at least four hours between them, anywhere in the world. I have a fairly low appetite for that kind of risk. Since you're getting a visa anyway, you can go out into the city and stay overnight if you wish, which would virtually eliminate any risk of missing your connection.