Recorded macros are very limited and use so-called UNO commands which are chosen without trying to get consistency with API calls.
Reworking recorded macros by deleting or changing parts or by insertion of hand-written Basic lines is not helpfulk with learning to code Basic macros.
If you consider to use hand-written code (instead of recorded macros) you may start with:
REM ***** BASIC *****
Option Explicit
Sub written()
Const startCopy = "B11"
Const startPasteValues = "K1"
Dim numRows As Long
Dim theSheet As Object
Dim sourceCell1 As Object
Dim targetCell1 As Object
Dim sourceRangeCursor As Object
Dim targetRangeCursor As Object
theSheet = ThisComponent.CurrentController.ActiveSheet
numRows = InputBox("Number of rows: ", "Prompt for ...", 1)
sourceCell1 = theSheet.getCellRangeByName(startCopy)
sourceRangeCursor = theSheet.createCursorByRange(sourceCell1)
sourceRangeCursor.collapseToSize(1, numRows)
targetCell1 = theSheet.getCellRangeByName(startPasteValues)
targetRangeCursor = theSheet.createCursorByRange(targetCell1)
targetRangeCursor.collapseToSize(1, numRows)
targetRangeCursor.setDataArray(sourceRangeCursor.getDataArray())
End Sub
REM Advantages:
REM You can use "speaking names".
REM You get compact code.
REM The code is well readable.
REM You have an opportunity to learn something interesting.
I wrote the code based on your original question (as I undertsood it).