You are probably experiencing what many, many M1 iMac owners are experiencing:
The following topics illustrate the Silicon M1 iMac Display problem:
Screen Failure on 24-inch-iMac, M1, 2021 - Apple Community
Persistent horizontal lines appear on iMac Screen - Apple Community
Horizontal Lines on Screen of iMac, 24", 2021
Horizontal black lines covering bottom 3rd of 2021 M1 iMac screen
Grey horizontal patches on my M1 iMac 2021 model
Horizontal lines at the bottom of iMac(M1,2021) screen
Horizontal Lines on 2001 M1 iMac Display
M1 iMac Display vertex heating to scorching 55°C — Seeking Advice on Escalation
Horizontal Lines on iMAC with M1 chips
Others have reported that the repairs will cost about $600 US. That's about ⅔'s of a new Mac Mini M4.
You have maybe 3 options:
1 - pay the ~$600 US price for Apple or an Apple Authorized Service Provider to repair the monitor (which is over ½ of a new M1 Mac Mini).
2 - get a monitor and use it with your M1 iMac. You can get a 27" or 32" monitor from $140 US on up.
3 - get a new Mac. If considering this option consider the following: a 10 Core Mac Mini M4 with 16 GB RAM and 1 TB SSD ($1084 US) with a 32" LG 4k monitor ($331 US) from Amazon.com) is $1415 which is $541 less than a similarly configured new 24" iMac ($1956 US) re 07/2025. Keep your keyboard and mouse from your current Mac for use with the Mini.
I got the above Mini with a 32" LG 4K monitor w/speakers for only $60 more than the 27" (didn't know the Mini had a speaker). There are many monitors available in 27" size on up for $100 US to $500 US depending on what features you want. The monitor prices are before tariffs.
Just some food for thought.
ADDENDUM: in addition to the 3 choices above keep tabs on the Apple Service (Recall) Programs - Apple Support
