One method is to use Python and copy the values, symbol colour and label from the categorisation of the line layer to the point layer. We can store the line symbology attributes in a dictionary and create a new style using the stored values.
You can test the following code, changing the names of the layers and the field name:
from PyQt5.QtGui import QColor
from qgis.core import QgsProject, QgsSymbol, QgsRendererCategory, QgsCategorizedSymbolRenderer
style_dict = {}
layer_1 = QgsProject.instance().mapLayersByName("Point example")[0]
renderer = layer_1.renderer()
if renderer.type() == "categorizedSymbol":
for cat in renderer.categories():
style_dict[cat.value()] = (cat.symbol().color(), cat.label())
categories = []
layer_2 = QgsProject.instance().mapLayersByName("Line example")[0]
for classes, (color, label) in style_dict.items():
symbol = QgsSymbol.defaultSymbol(layer_2.geometryType())
symbol.setColor(QColor(color))
category = QgsRendererCategory(classes, symbol, label)
categories.append(category)
field = 'ID'
renderer = QgsCategorizedSymbolRenderer(field, categories)
layer_2.setRenderer(renderer)
layer_2.triggerRepaint()
Example:
Edit:
If you want to also copy the same field name used in the line layer, replace:
field = 'ID'
with:
field = renderer.classAttribute()