g | x | w | all
Bytes Lang Time Link
064Python 3251010T060244ZRandom D
050AWK250929T133200Zxrs
00705AB1E250929T070934ZKevin Cr
073C gcc250927T161227Zjdt
037JavaScript ES8250926T190719ZArnauld
039Dyalog APL250927T061116ZAaron
003Vyxal250927T040315Zlyxal
040Google Sheets250926T214330Zdoubleun
031Retina 0.8.2250926T213722ZNeil
040PowerShell250926T201114Zuser3141
007Japt R250926T194037ZShaggy
077R250926T175049ZM--
043R250926T190105Zpajonk
056JavaScript250926T172216ZQOO-OOKA

Python 3 65 64 bytes

-1 byte from @caird coinheringaahing

lambda x,y:f"\n".join([" "*y+i.lstrip()for i in x.splitlines()])

AWK, 50 bytes

1~NR{x=$0}_++{sub(/^ +/,X);printf"%*s%s\n",x,X,$0}

Attempt This Online!

1~NR{x=$0}              # get indent number from first row
_++{                    # after first row
sub(/^ +/,X);           # remove leading spaces
printf"%*s%s\n",x,X,$0} # formatted print

05AB1E, 7 bytes

¶¡ðδÛú»

Two separated inputs as a multiline string and number.

Try it online or verify all test cases.

Explanation:

¶¡       # Split the first (implicit) input-string on newlines
   δ     # Map over each line:
  ð Û    #  Trim all leading spaces
     ú   # Using the second (implicit) input-integer, pad that many leading spaces
         # to each line
      »  # Join the lines back by newlines
         # (after which the string is output implicitly as result)

C (gcc), 73 bytes

f(s,n){for(;s=strtok(s,"\n");s=!printf("%*s%s\n",n,"",s+strspn(s," ")));}

Try it online!

JavaScript (ES8), 37 bytes

Expects (string)(indent).

s=>n=>s.replace(/^ */gm,"".padEnd(n))

Try it online!

Commented

s =>           // outer function taking s
n =>           // inner function taking n
s.replace(     // replace in s:
  /^ */gm,     //   leading spaces on each line
  "".padEnd(n) //   with n spaces
)              // end of replace()

Dyalog APL, 39 bytes

Accepts indent size on the left and multi-line string on the right

{(⍺⍴''),⍤1↑{⍵/⍨∨\' '≠⍵}¨⍵(≠⊆⊣)⎕UCS 10}­⁡​‎‎⁡⁠⁢⁣⁡‏⁠‎⁡⁠⁢⁣⁢‏⁠‎⁡⁠⁢⁣⁣‏⁠‎⁡⁠⁢⁣⁤‏⁠‎⁡⁠⁢⁤⁡‏⁠‎⁡⁠⁢⁤⁢‏⁠‎⁡⁠⁢⁤⁣‏⁠‎⁡⁠⁢⁤⁤‏⁠‎⁡⁠⁣⁡⁡‏⁠‎⁡⁠⁣⁡⁢‏⁠‎⁡⁠⁣⁡⁣‏⁠‎⁡⁠⁣⁡⁤‏⁠‎⁡⁠⁣⁢⁡‏⁠‏​⁡⁠⁡‌⁢​‎‎⁡⁠⁣⁤‏⁠‎⁡⁠⁢⁢⁣‏⁠‎⁡⁠⁢⁢⁤‏⁠‏​⁡⁠⁡‌⁣​‎‎⁡⁠⁢⁡⁢‏⁠‎⁡⁠⁢⁡⁣‏⁠‎⁡⁠⁢⁡⁤‏⁠‎⁡⁠⁢⁢⁡‏⁠‎⁡⁠⁢⁢⁢‏‏​⁡⁠⁡‌⁤​‎‎⁡⁠⁤⁤‏⁠‎⁡⁠⁢⁡⁡‏‏​⁡⁠⁡‌⁢⁡​‎‎⁡⁠⁤⁡‏⁠‎⁡⁠⁤⁢‏⁠‎⁡⁠⁤⁣‏‏​⁡⁠⁡‌⁢⁢​‎⁠‎⁡⁠⁣⁣‏‏​⁡⁠⁡‌⁢⁣​‎‎⁡⁠⁢‏⁠‎⁡⁠⁣‏⁠‎⁡⁠⁤‏⁠‎⁡⁠⁢⁡‏⁠‎⁡⁠⁢⁢‏⁠‎⁡⁠⁢⁣‏‏​⁡⁠⁡‌⁢⁤​‎‎⁡⁠⁢⁤‏⁠‎⁡⁠⁣⁡‏⁠‎⁡⁠⁣⁢‏‏​⁡⁠⁡‌­
                        ⍵(≠⊆⊣)⎕UCS 10   # ‎⁡Classic split input on newline
           {          }¨                # ‎⁢For each line
                 ' '≠⍵                  # ‎⁣  Find what is not a space
               ∨\                       # ‎⁤  Or-scan reveals the start of letters
            ⍵/⍨                         # ‎⁢⁡  Select those from input
          ↑                             # ‎⁢⁢Mix (essentially join by newlines)
 (⍺⍴'')                                 # ‎⁢⁣Grab left-arg many spaces
       ,⍤1                              # ‎⁢⁤Prepend those spaces to each row
💎

Created with the help of Luminespire.

Vyxal, 3 bytes

øL꘍

Try it Online!

Expects string as a list of lines, then indent. Outputs a list of lines.

Explained

øL꘍
øL  # Remove all leading spaces from each line
  ꘍ # And add (indent) spaces to the front of each line.

Google Sheets, 40 bytes

=regexreplace(A1,"(?m)^ *",rept(" ",B1))

screenshot

Retina 0.8.2, 31 bytes

m`^ *(?<=(\d+)(¶.*)+)
$1$* 
1A`

Try it online! Takes the desired indent on the first line. Explanation:

m`^ *(?<=(\d+)(¶.*)+)

Match the indent of each line, then search back for the desired indent.

$1$* 

Replace the indent with a string of spaces repeated the desired number of times.

1A`

Delete the desired indent.

PowerShell, 40 bytes

$args[0]-replace'(?m)^ *',(' '*$args[1])

Try it online!

A regular expression that replaces any spaces following a line start (the ^ anchor) with the proper amount of spaces generated by 'multiplying' a space. The (?m) turns on multiline mode, where ^ also matches line beginnings, otherwise the .net regex engine would just match the string beginning.

Japt -R, 7 bytes

·Ëx iVç

Try it

R, 77 bytes

\(x,n)cat(paste0(strrep(" ",n),trimws(el(strsplit(x,"
")),"l"),collapse="
"))

Attempt This Online!

R, 43 bytes

\(x,n)gsub("(?<=^|
) *",strrep(" ",n),x,,T)

Attempt This Online!

Test suite borrowed from @M--'s answer.

JavaScript, 56 bytes

(t,n)=>t.replace(/^.*$/gm,l=>' '.repeat(n)+l.trimLeft())

Where t is the text to flatten and s is a number of count of spaces of indention.