The HTTP 301 status code means Moved Permanently: under RFC 9110, Section 15.4.2, the resource a client asked for has been given a new permanent address, and future references to it ought to use the new one. The specification puts it this way: "The 301 (Moved Permanently) status code indicates that the target resource has been assigned a new permanent URI and any future references to this resource ought to use one of the enclosed URIs."
Where the new address comes from
RFC 9110 says the server SHOULD generate a Location header field in a 301 response containing a preferred URI reference for the new permanent URI, and the user agent MAY use that value to redirect automatically. The same section says the response content usually contains a short hypertext note with a link to the new URI.
The Location header field holds a single URI reference. For 3xx responses, it refers to the preferred target resource for automatically redirecting the request, and a relative reference is resolved against the original target URI. If the Location value in a redirect has no fragment (the part after "#"), the same section says the user agent MUST treat it as inheriting the fragment of the original reference.
Permanent references
Section 15.4.2 says the server is suggesting that a user agent with link-editing capability can permanently replace references to the old URI with the new one. The specification adds that this suggestion is usually ignored unless the user agent is actively editing references, the connection is secured, and the origin server is a trusted authority for the content being edited.